0s autopkgtest [13:15:38]: starting date and time: 2026-01-24 13:15:38+0000 0s autopkgtest [13:15:38]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [13:15:38]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.rxtqumh2/out --timeout-copy=6000 --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-4.secgroup --name adt-resolute-amd64-pystac-20260124-131537-juju-7f2275-prod-proposed-migration-environment-2-42d52d07-6c1d-425d-abc7-50d4f2ab151a --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/ 3s Creating nova instance adt-resolute-amd64-pystac-20260124-131537-juju-7f2275-prod-proposed-migration-environment-2-42d52d07-6c1d-425d-abc7-50d4f2ab151a from image adt/ubuntu-resolute-amd64-server-20260124.img (UUID 46811f22-3700-43f4-953b-ee3c613d71bb)... 75s autopkgtest [13:16:53]: testbed dpkg architecture: amd64 75s autopkgtest [13:16:53]: testbed apt version: 3.1.13 76s autopkgtest [13:16:54]: @@@@@@@@@@@@@@@@@@@@ test bed setup 76s autopkgtest [13:16:54]: testbed release detected to be: None 76s autopkgtest [13:16:54]: updating testbed package index (apt update) 77s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 77s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 77s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 77s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 77s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [92.3 kB] 77s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [2820 B] 77s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [998 kB] 77s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [24.3 kB] 77s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main i386 Packages [98.2 kB] 77s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 Packages [115 kB] 77s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 c-n-f Metadata [3712 B] 77s Get:12 http://ftpmaster.internal/ubuntu resolute-proposed/restricted i386 Packages [3696 B] 77s Get:13 http://ftpmaster.internal/ubuntu resolute-proposed/restricted amd64 Packages [12.3 kB] 77s Get:14 http://ftpmaster.internal/ubuntu resolute-proposed/restricted amd64 c-n-f Metadata [336 B] 77s Get:15 http://ftpmaster.internal/ubuntu resolute-proposed/universe amd64 Packages [905 kB] 77s Get:16 http://ftpmaster.internal/ubuntu resolute-proposed/universe i386 Packages [385 kB] 77s Get:17 http://ftpmaster.internal/ubuntu resolute-proposed/universe amd64 c-n-f Metadata [24.9 kB] 78s Get:18 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse amd64 Packages [12.4 kB] 78s Get:19 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse i386 Packages [4704 B] 78s Get:20 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse amd64 c-n-f Metadata [824 B] 78s Fetched 2806 kB in 1s (2852 kB/s) 79s Reading package lists... 79s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 79s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 79s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 79s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 80s Reading package lists... 80s Reading package lists... 80s Building dependency tree... 80s Reading state information... 80s Calculating upgrade... 80s The following packages were automatically installed and are no longer required: 80s python3.13 python3.13-minimal 80s Use 'sudo apt autoremove' to remove them. 80s The following NEW packages will be installed: 80s libpython3.14-minimal libpython3.14-stdlib python3.14 python3.14-minimal 80s The following packages will be upgraded: 80s libpython3-stdlib python3 python3-gdbm python3-minimal rust-coreutils 80s 5 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. 80s Need to get 10.4 MB of archives. 80s After this operation, 25.2 MB of additional disk space will be used. 80s Get:1 http://ftpmaster.internal/ubuntu resolute/main amd64 libpython3.14-minimal amd64 3.14.2-1 [920 kB] 80s Get:2 http://ftpmaster.internal/ubuntu resolute/main amd64 python3.14-minimal amd64 3.14.2-1 [2563 kB] 80s Get:3 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 python3-minimal amd64 3.14.2-1 [28.2 kB] 80s Get:4 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 python3 amd64 3.14.2-1 [22.9 kB] 81s Get:5 http://ftpmaster.internal/ubuntu resolute/main amd64 libpython3.14-stdlib amd64 3.14.2-1 [2398 kB] 81s Get:6 http://ftpmaster.internal/ubuntu resolute/main amd64 python3.14 amd64 3.14.2-1 [816 kB] 81s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 libpython3-stdlib amd64 3.14.2-1 [10.9 kB] 81s Get:8 http://ftpmaster.internal/ubuntu resolute/main amd64 rust-coreutils amd64 0.5.0-0ubuntu1 [3628 kB] 81s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 python3-gdbm amd64 3.14.2-1 [11.1 kB] 81s dpkg-preconfigure: unable to re-open stdin: No such file or directory 81s Fetched 10.4 MB in 1s (19.3 MB/s) 81s Selecting previously unselected package libpython3.14-minimal:amd64. 81s (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 ... 124177 files and directories currently installed.) 81s Preparing to unpack .../libpython3.14-minimal_3.14.2-1_amd64.deb ... 81s Unpacking libpython3.14-minimal:amd64 (3.14.2-1) ... 81s Selecting previously unselected package python3.14-minimal. 81s Preparing to unpack .../python3.14-minimal_3.14.2-1_amd64.deb ... 81s Unpacking python3.14-minimal (3.14.2-1) ... 81s Setting up libpython3.14-minimal:amd64 (3.14.2-1) ... 81s Setting up python3.14-minimal (3.14.2-1) ... 82s (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 ... 124519 files and directories currently installed.) 82s Preparing to unpack .../python3-minimal_3.14.2-1_amd64.deb ... 82s Unpacking python3-minimal (3.14.2-1) over (3.13.9-3) ... 82s Setting up python3-minimal (3.14.2-1) ... 82s (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 ... 124519 files and directories currently installed.) 82s Preparing to unpack .../python3_3.14.2-1_amd64.deb ... 82s running python pre-rtupdate hooks for python3.14... 82s Unpacking python3 (3.14.2-1) over (3.13.9-3) ... 82s Selecting previously unselected package libpython3.14-stdlib:amd64. 82s Preparing to unpack .../libpython3.14-stdlib_3.14.2-1_amd64.deb ... 82s Unpacking libpython3.14-stdlib:amd64 (3.14.2-1) ... 82s Selecting previously unselected package python3.14. 82s Preparing to unpack .../python3.14_3.14.2-1_amd64.deb ... 82s Unpacking python3.14 (3.14.2-1) ... 82s Preparing to unpack .../libpython3-stdlib_3.14.2-1_amd64.deb ... 82s Unpacking libpython3-stdlib:amd64 (3.14.2-1) over (3.13.9-3) ... 82s Preparing to unpack .../rust-coreutils_0.5.0-0ubuntu1_amd64.deb ... 82s Unpacking rust-coreutils (0.5.0-0ubuntu1) over (0.2.2-0ubuntu2) ... 82s Setting up rust-coreutils (0.5.0-0ubuntu1) ... 82s (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 ... 124980 files and directories currently installed.) 82s Preparing to unpack .../python3-gdbm_3.14.2-1_amd64.deb ... 82s Unpacking python3-gdbm (3.14.2-1) over (3.13.9-3) ... 83s Setting up libpython3.14-stdlib:amd64 (3.14.2-1) ... 83s Setting up python3.14 (3.14.2-1) ... 83s Setting up libpython3-stdlib:amd64 (3.14.2-1) ... 83s Setting up python3-gdbm (3.14.2-1) ... 83s Setting up python3 (3.14.2-1) ... 83s running python rtupdate hooks for python3.14... 83s running python post-rtupdate hooks for python3.14... 83s Processing triggers for man-db (2.13.1-1) ... 84s Processing triggers for systemd (259-1ubuntu2) ... 84s autopkgtest [13:17:02]: upgrading testbed (apt dist-upgrade and autopurge) 84s Reading package lists... 84s Building dependency tree... 84s Reading state information... 84s Calculating upgrade... 84s The following packages were automatically installed and are no longer required: 84s python3.13 python3.13-minimal 84s Use 'sudo apt autoremove' to remove them. 84s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 84s Reading package lists... 84s Building dependency tree... 84s Reading state information... 85s Solving dependencies... 85s The following packages will be REMOVED: 85s python3.13* python3.13-minimal* 85s 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. 85s After this operation, 7860 kB disk space will be freed. 85s (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 ... 124978 files and directories currently installed.) 85s Removing python3.13 (3.13.11-1) ... 85s Removing python3.13-minimal (3.13.11-1) ... 85s Processing triggers for man-db (2.13.1-1) ... 85s Processing triggers for systemd (259-1ubuntu2) ... 86s (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 ... 124951 files and directories currently installed.) 86s Purging configuration files for python3.13-minimal (3.13.11-1) ... 88s autopkgtest [13:17:06]: testbed running kernel: Linux 6.18.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 12 16:49:02 UTC 2026 88s autopkgtest [13:17:06]: @@@@@@@@@@@@@@@@@@@@ apt-source pystac 89s Get:1 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (dsc) [3523 B] 89s Get:2 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (tar) [2455 kB] 89s Get:3 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (diff) [27.7 kB] 90s gpgv: Signature made Sat Jan 10 12:09:05 2026 UTC 90s gpgv: using RSA key 3B70F209A5FFD68903C472C5EBF48AB2578F9812 90s gpgv: issuer "antonio.valentino@tiscali.it" 90s gpgv: Can't check signature: No public key 90s dpkg-source: warning: cannot verify inline signature for ./pystac_1.14.3-1.dsc: no acceptable signature found 90s autopkgtest [13:17:08]: testing package pystac version 1.14.3-1 90s autopkgtest [13:17:08]: build not needed 92s autopkgtest [13:17:10]: test pybuild-autopkgtest: preparing testbed 92s Reading package lists... 92s Building dependency tree... 92s Reading state information... 92s Solving dependencies... 92s The following NEW packages will be installed: 92s autoconf automake autopoint autotools-dev build-essential cpp cpp-15 92s cpp-15-x86-64-linux-gnu cpp-x86-64-linux-gnu debhelper debugedit 92s dh-autoreconf dh-python dh-strip-nondeterminism docutils-common dwz 92s fontconfig-config fonts-dejavu-core fonts-dejavu-mono fonts-mathjax g++ 92s g++-15 g++-15-x86-64-linux-gnu g++-x86-64-linux-gnu gcc gcc-15 92s gcc-15-x86-64-linux-gnu gcc-x86-64-linux-gnu gdal-data gdal-plugins gettext 92s intltool-debian libabsl20260107 libaec0 libaom3 libarchive-zip-perl 92s libarmadillo14 libarpack2t64 libasan8 libavif16 libblas3 libblosc1 libcc1-0 92s libcfitsio10t64 libdav1d7 libde265-0 libdebhelper-perl libdeflate0 92s libfile-stripnondeterminism-perl libfontconfig1 libfreexl1 libfyba0t64 92s libgav1-2 libgcc-15-dev libgdal36 libgeos-c1t64 libgeos3.14.1 libgeotiff5 92s libgfortran5 libgif7 libgomp1 libgpgmepp6t64 libhdf4-0-alt libhdf5-310 92s libhdf5-hl-310 libheif-plugin-aomdec libheif-plugin-libde265 libheif1 92s libhwasan0 libisl23 libitm1 libjbig0 libjpeg-turbo8 libjpeg8 libjs-mathjax 92s libjson-perl libkmlbase1t64 libkmldom1t64 libkmlengine1t64 liblapack3 92s liblcms2-2 liblerc4 liblsan0 libltdl7 liblua5.4-0 libminizip1t64 libmpc3 92s libmysqlclient24 libnetcdf22 libnorm1t64 libodbc2 libodbcinst2 libogdi4.1 92s libopenjp2-7 libpgm-5.3-0t64 libpoppler147 libpq5 libproj25 libqhull-r8.0 92s libquadmath0 librttopo1 libsharpyuv0 libsnappy1v5 libsodium23 92s libspatialite8t64 libstdc++-15-dev libsz2 libtiff6 libtool libtsan2 92s libubsan1 liburiparser1 libwebp7 libxerces-c3.2t64 libyuv0 libzmq5 m4 92s mysql-common node-fortawesome-fontawesome-free pandoc pandoc-data po-debconf 92s proj-data pybuild-plugin-autopkgtest pybuild-plugin-pyproject 92s python-pystac-doc python-tinycss2-common python3-accessible-pygments 92s python3-affine python3-alabaster python3-all python3-anyio python3-astroid 92s python3-asttokens python3-bleach python3-bs4 python3-build python3-click 92s python3-click-plugins python3-cligj python3-colorama python3-decorator 92s python3-defusedxml python3-docutils python3-executing python3-fastjsonschema 92s python3-h11 python3-html5lib python3-imagesize python3-iniconfig 92s python3-installer python3-ipython python3-jedi python3-jupyter-client 92s python3-jupyter-core python3-jupyterlab-pygments python3-livereload 92s python3-matplotlib-inline python3-mistune python3-multidict python3-nbclient 92s python3-nbconvert python3-nbformat python3-nbsphinx python3-numpy 92s python3-numpy-dev python3-pandocfilters python3-parso python3-platformdirs 92s python3-pluggy python3-prompt-toolkit python3-propcache python3-psutil 92s python3-pure-eval python3-pydata-sphinx-theme python3-pyproject-hooks 92s python3-pystac python3-pytest python3-pytest-mock python3-pytest-recording 92s python3-rasterio python3-requests-mock python3-roman-numerals 92s python3-shapely python3-sniffio python3-snowballstemmer python3-soupsieve 92s python3-sphinx python3-sphinx-autobuild python3-sphinx-design 92s python3-stack-data python3-starlette python3-tinycss2 python3-tornado 92s python3-traitlets python3-typeshed python3-uvicorn python3-uvloop 92s python3-vcr python3-watchfiles python3-wcwidth python3-webencodings 92s python3-websockets python3-wheel python3-wrapt python3-wsproto python3-yarl 92s python3-zmq python3.13 python3.13-minimal sgml-base sphinx-common 92s unixodbc-common xml-core 92s 0 upgraded, 214 newly installed, 0 to remove and 0 not upgraded. 92s Need to get 184 MB of archives. 92s After this operation, 818 MB of additional disk space will be used. 92s Get:1 http://ftpmaster.internal/ubuntu resolute/main amd64 python3.13-minimal amd64 3.13.11-1 [2408 kB] 92s Get:2 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-numpy-dev amd64 1:2.3.5+ds-3 [147 kB] 92s Get:3 http://ftpmaster.internal/ubuntu resolute/main amd64 libblas3 amd64 3.12.1-7ubuntu1 [260 kB] 93s Get:4 http://ftpmaster.internal/ubuntu resolute/main amd64 libgfortran5 amd64 15.2.0-11ubuntu1 [939 kB] 93s Get:5 http://ftpmaster.internal/ubuntu resolute/main amd64 liblapack3 amd64 3.12.1-7ubuntu1 [2739 kB] 93s Get:6 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-numpy amd64 1:2.3.5+ds-3 [8129 kB] 93s Get:7 http://ftpmaster.internal/ubuntu resolute/main amd64 python3.13 amd64 3.13.11-1 [758 kB] 93s Get:8 http://ftpmaster.internal/ubuntu resolute/main amd64 m4 amd64 1.4.20-2 [217 kB] 93s Get:9 http://ftpmaster.internal/ubuntu resolute/main amd64 autoconf all 2.72-3.1ubuntu1 [384 kB] 93s Get:10 http://ftpmaster.internal/ubuntu resolute/main amd64 autotools-dev all 20240727.1 [43.4 kB] 93s Get:11 http://ftpmaster.internal/ubuntu resolute/main amd64 automake all 1:1.18.1-3build1 [582 kB] 93s Get:12 http://ftpmaster.internal/ubuntu resolute/main amd64 autopoint all 0.23.2-1 [620 kB] 93s Get:13 http://ftpmaster.internal/ubuntu resolute/main amd64 libisl23 amd64 0.27-1build1 [691 kB] 93s Get:14 http://ftpmaster.internal/ubuntu resolute/main amd64 libmpc3 amd64 1.3.1-2 [54.8 kB] 93s Get:15 http://ftpmaster.internal/ubuntu resolute/main amd64 cpp-15-x86-64-linux-gnu amd64 15.2.0-11ubuntu1 [12.9 MB] 94s Get:16 http://ftpmaster.internal/ubuntu resolute/main amd64 cpp-15 amd64 15.2.0-11ubuntu1 [1030 B] 94s Get:17 http://ftpmaster.internal/ubuntu resolute/main amd64 cpp-x86-64-linux-gnu amd64 4:15.2.0-4ubuntu1 [5746 B] 94s Get:18 http://ftpmaster.internal/ubuntu resolute/main amd64 cpp amd64 4:15.2.0-4ubuntu1 [22.4 kB] 94s Get:19 http://ftpmaster.internal/ubuntu resolute/main amd64 libcc1-0 amd64 15.2.0-11ubuntu1 [47.4 kB] 94s Get:20 http://ftpmaster.internal/ubuntu resolute/main amd64 libgomp1 amd64 15.2.0-11ubuntu1 [151 kB] 94s Get:21 http://ftpmaster.internal/ubuntu resolute/main amd64 libitm1 amd64 15.2.0-11ubuntu1 [29.5 kB] 94s Get:22 http://ftpmaster.internal/ubuntu resolute/main amd64 libasan8 amd64 15.2.0-11ubuntu1 [3070 kB] 94s Get:23 http://ftpmaster.internal/ubuntu resolute/main amd64 liblsan0 amd64 15.2.0-11ubuntu1 [1360 kB] 94s Get:24 http://ftpmaster.internal/ubuntu resolute/main amd64 libtsan2 amd64 15.2.0-11ubuntu1 [2757 kB] 94s Get:25 http://ftpmaster.internal/ubuntu resolute/main amd64 libubsan1 amd64 15.2.0-11ubuntu1 [1210 kB] 94s Get:26 http://ftpmaster.internal/ubuntu resolute/main amd64 libhwasan0 amd64 15.2.0-11ubuntu1 [1685 kB] 94s Get:27 http://ftpmaster.internal/ubuntu resolute/main amd64 libquadmath0 amd64 15.2.0-11ubuntu1 [153 kB] 94s Get:28 http://ftpmaster.internal/ubuntu resolute/main amd64 libgcc-15-dev amd64 15.2.0-11ubuntu1 [2863 kB] 94s Get:29 http://ftpmaster.internal/ubuntu resolute/main amd64 gcc-15-x86-64-linux-gnu amd64 15.2.0-11ubuntu1 [25.4 MB] 95s Get:30 http://ftpmaster.internal/ubuntu resolute/main amd64 gcc-15 amd64 15.2.0-11ubuntu1 [528 kB] 95s Get:31 http://ftpmaster.internal/ubuntu resolute/main amd64 gcc-x86-64-linux-gnu amd64 4:15.2.0-4ubuntu1 [1208 B] 95s Get:32 http://ftpmaster.internal/ubuntu resolute/main amd64 gcc amd64 4:15.2.0-4ubuntu1 [5024 B] 95s Get:33 http://ftpmaster.internal/ubuntu resolute/main amd64 libstdc++-15-dev amd64 15.2.0-11ubuntu1 [2574 kB] 95s Get:34 http://ftpmaster.internal/ubuntu resolute/main amd64 g++-15-x86-64-linux-gnu amd64 15.2.0-11ubuntu1 [14.4 MB] 95s Get:35 http://ftpmaster.internal/ubuntu resolute/main amd64 g++-15 amd64 15.2.0-11ubuntu1 [24.6 kB] 95s Get:36 http://ftpmaster.internal/ubuntu resolute/main amd64 g++-x86-64-linux-gnu amd64 4:15.2.0-4ubuntu1 [966 B] 95s Get:37 http://ftpmaster.internal/ubuntu resolute/main amd64 g++ amd64 4:15.2.0-4ubuntu1 [1100 B] 95s Get:38 http://ftpmaster.internal/ubuntu resolute/main amd64 build-essential amd64 12.12ubuntu2 [5256 B] 95s Get:39 http://ftpmaster.internal/ubuntu resolute/main amd64 libdebhelper-perl all 13.28ubuntu1 [97.4 kB] 95s Get:40 http://ftpmaster.internal/ubuntu resolute/main amd64 libtool all 2.5.4-9 [169 kB] 95s Get:41 http://ftpmaster.internal/ubuntu resolute/main amd64 dh-autoreconf all 21 [12.5 kB] 95s Get:42 http://ftpmaster.internal/ubuntu resolute/main amd64 libarchive-zip-perl all 1.68-1 [90.2 kB] 95s Get:43 http://ftpmaster.internal/ubuntu resolute/main amd64 libfile-stripnondeterminism-perl all 1.15.0-1build1 [20.6 kB] 95s Get:44 http://ftpmaster.internal/ubuntu resolute/main amd64 dh-strip-nondeterminism all 1.15.0-1build1 [5110 B] 95s Get:45 http://ftpmaster.internal/ubuntu resolute/main amd64 debugedit amd64 1:5.2-3 [49.9 kB] 95s Get:46 http://ftpmaster.internal/ubuntu resolute/main amd64 dwz amd64 0.16-2 [115 kB] 95s Get:47 http://ftpmaster.internal/ubuntu resolute/main amd64 gettext amd64 0.23.2-1 [1019 kB] 95s Get:48 http://ftpmaster.internal/ubuntu resolute/main amd64 intltool-debian all 0.35.0+20060710.6build1 [24.1 kB] 95s Get:49 http://ftpmaster.internal/ubuntu resolute/main amd64 po-debconf all 1.0.22 [215 kB] 95s Get:50 http://ftpmaster.internal/ubuntu resolute/main amd64 debhelper all 13.28ubuntu1 [916 kB] 95s Get:51 http://ftpmaster.internal/ubuntu resolute/universe amd64 dh-python all 7.20251231 [122 kB] 95s Get:52 http://ftpmaster.internal/ubuntu resolute/main amd64 sgml-base all 1.31+nmu1 [11.0 kB] 95s Get:53 http://ftpmaster.internal/ubuntu resolute/main amd64 xml-core all 0.19build1 [20.3 kB] 95s Get:54 http://ftpmaster.internal/ubuntu resolute/main amd64 docutils-common all 0.22.4+dfsg-1 [130 kB] 95s Get:55 http://ftpmaster.internal/ubuntu resolute/main amd64 fonts-dejavu-mono all 2.37-8build1 [502 kB] 95s Get:56 http://ftpmaster.internal/ubuntu resolute/main amd64 fonts-dejavu-core all 2.37-8build1 [834 kB] 95s Get:57 http://ftpmaster.internal/ubuntu resolute/main amd64 fontconfig-config amd64 2.15.0-2.4ubuntu1 [38.1 kB] 95s Get:58 http://ftpmaster.internal/ubuntu resolute/main amd64 fonts-mathjax all 2.7.9+dfsg-1build1 [2283 kB] 95s Get:59 http://ftpmaster.internal/ubuntu resolute/universe amd64 gdal-data all 3.12.1+dfsg-1 [278 kB] 95s Get:60 http://ftpmaster.internal/ubuntu resolute/universe amd64 gdal-plugins amd64 3.12.1+dfsg-1 [26.8 kB] 95s Get:61 http://ftpmaster.internal/ubuntu resolute/main amd64 libabsl20260107 amd64 20260107.0-0ubuntu2 [587 kB] 96s Get:62 http://ftpmaster.internal/ubuntu resolute/universe amd64 libaec0 amd64 1.1.4-2 [22.9 kB] 96s Get:63 http://ftpmaster.internal/ubuntu resolute/main amd64 libaom3 amd64 3.13.1-2 [1970 kB] 96s Get:64 http://ftpmaster.internal/ubuntu resolute/universe amd64 libarpack2t64 amd64 3.9.1-6 [108 kB] 96s Get:65 http://ftpmaster.internal/ubuntu resolute/universe amd64 libarmadillo14 amd64 1:14.2.3+dfsg-1 [105 kB] 96s Get:66 http://ftpmaster.internal/ubuntu resolute/universe amd64 libdav1d7 amd64 1.5.3-1 [626 kB] 96s Get:67 http://ftpmaster.internal/ubuntu resolute/universe amd64 libgav1-2 amd64 0.20.0-2build1 [402 kB] 96s Get:68 http://ftpmaster.internal/ubuntu resolute/main amd64 libjpeg-turbo8 amd64 2.1.5-4ubuntu2 [152 kB] 96s Get:69 http://ftpmaster.internal/ubuntu resolute/main amd64 libjpeg8 amd64 8c-2ubuntu11 [2148 B] 96s Get:70 http://ftpmaster.internal/ubuntu resolute/main amd64 libyuv0 amd64 0.0.1922.20260106-1 [184 kB] 96s Get:71 http://ftpmaster.internal/ubuntu resolute/universe amd64 libavif16 amd64 1.3.0-1ubuntu3 [117 kB] 96s Get:72 http://ftpmaster.internal/ubuntu resolute/main amd64 libsnappy1v5 amd64 1.2.2-2 [30.8 kB] 96s Get:73 http://ftpmaster.internal/ubuntu resolute/universe amd64 libblosc1 amd64 1.21.5+ds-2 [35.8 kB] 96s Get:74 http://ftpmaster.internal/ubuntu resolute/universe amd64 libcfitsio10t64 amd64 4.6.3-1 [549 kB] 96s Get:75 http://ftpmaster.internal/ubuntu resolute/main amd64 libde265-0 amd64 1.0.16-1build1 [172 kB] 96s Get:76 http://ftpmaster.internal/ubuntu resolute/main amd64 libdeflate0 amd64 1.23-2 [49.9 kB] 96s Get:77 http://ftpmaster.internal/ubuntu resolute/main amd64 libfontconfig1 amd64 2.15.0-2.4ubuntu1 [143 kB] 96s Get:78 http://ftpmaster.internal/ubuntu resolute/universe amd64 libfyba0t64 amd64 4.1.1-11build2 [120 kB] 96s Get:79 http://ftpmaster.internal/ubuntu resolute/universe amd64 libminizip1t64 amd64 1:1.3.dfsg+really1.3.1-1ubuntu2 [23.5 kB] 96s Get:80 http://ftpmaster.internal/ubuntu resolute/universe amd64 libfreexl1 amd64 2.0.0-1build3 [42.9 kB] 96s Get:81 http://ftpmaster.internal/ubuntu resolute/universe amd64 libgeos3.14.1 amd64 3.14.1-2 [976 kB] 96s Get:82 http://ftpmaster.internal/ubuntu resolute/universe amd64 libgeos-c1t64 amd64 3.14.1-2 [116 kB] 96s Get:83 http://ftpmaster.internal/ubuntu resolute/universe amd64 proj-data all 9.7.1-1 [7950 kB] 96s Get:84 http://ftpmaster.internal/ubuntu resolute/main amd64 libjbig0 amd64 2.1-6.1ubuntu3 [30.0 kB] 96s Get:85 http://ftpmaster.internal/ubuntu resolute/main amd64 liblerc4 amd64 4.0.0+ds-5ubuntu2 [207 kB] 96s Get:86 http://ftpmaster.internal/ubuntu resolute/main amd64 libsharpyuv0 amd64 1.5.0-0.1build1 [17.6 kB] 96s Get:87 http://ftpmaster.internal/ubuntu resolute/main amd64 libwebp7 amd64 1.5.0-0.1build1 [264 kB] 96s Get:88 http://ftpmaster.internal/ubuntu resolute/main amd64 libtiff6 amd64 4.7.0-3ubuntu3 [209 kB] 96s Get:89 http://ftpmaster.internal/ubuntu resolute/universe amd64 libproj25 amd64 9.7.1-1 [1499 kB] 96s Get:90 http://ftpmaster.internal/ubuntu resolute/universe amd64 libgeotiff5 amd64 1.7.4-1 [60.2 kB] 96s Get:91 http://ftpmaster.internal/ubuntu resolute/main amd64 libgif7 amd64 5.2.2-1ubuntu3 [36.0 kB] 96s Get:92 http://ftpmaster.internal/ubuntu resolute/universe amd64 libsz2 amd64 1.1.4-2 [5516 B] 96s Get:93 http://ftpmaster.internal/ubuntu resolute/universe amd64 libhdf4-0-alt amd64 4.3.0-1 [285 kB] 96s Get:94 http://ftpmaster.internal/ubuntu resolute/universe amd64 libhdf5-310 amd64 1.14.6+repack-2 [1433 kB] 96s Get:95 http://ftpmaster.internal/ubuntu resolute/main amd64 libheif-plugin-aomdec amd64 1.21.2-1 [14.2 kB] 96s Get:96 http://ftpmaster.internal/ubuntu resolute/main amd64 libheif-plugin-libde265 amd64 1.21.2-1 [9978 B] 96s Get:97 http://ftpmaster.internal/ubuntu resolute/main amd64 libheif1 amd64 1.21.2-1 [544 kB] 96s Get:98 http://ftpmaster.internal/ubuntu resolute/universe amd64 liburiparser1 amd64 0.9.8+dfsg-2 [46.8 kB] 96s Get:99 http://ftpmaster.internal/ubuntu resolute/universe amd64 libkmlbase1t64 amd64 1.3.0-13 [51.7 kB] 96s Get:100 http://ftpmaster.internal/ubuntu resolute/universe amd64 libkmldom1t64 amd64 1.3.0-13 [156 kB] 96s Get:101 http://ftpmaster.internal/ubuntu resolute/universe amd64 libkmlengine1t64 amd64 1.3.0-13 [74.1 kB] 96s Get:102 http://ftpmaster.internal/ubuntu resolute/main amd64 mysql-common all 5.8+1.1.1ubuntu2 [7002 B] 96s Get:103 http://ftpmaster.internal/ubuntu resolute/main amd64 libmysqlclient24 amd64 8.4.7-0ubuntu3 [1258 kB] 96s Get:104 http://ftpmaster.internal/ubuntu resolute/universe amd64 libhdf5-hl-310 amd64 1.14.6+repack-2 [59.9 kB] 96s Get:105 http://ftpmaster.internal/ubuntu resolute/universe amd64 libnetcdf22 amd64 1:4.9.3-1build1 [561 kB] 96s Get:106 http://ftpmaster.internal/ubuntu resolute/main amd64 libltdl7 amd64 2.5.4-9 [43.7 kB] 96s Get:107 http://ftpmaster.internal/ubuntu resolute/main amd64 libodbc2 amd64 2.3.14-1 [160 kB] 96s Get:108 http://ftpmaster.internal/ubuntu resolute/main amd64 unixodbc-common all 2.3.14-1 [8792 B] 96s Get:109 http://ftpmaster.internal/ubuntu resolute/main amd64 libodbcinst2 amd64 2.3.14-1 [32.0 kB] 96s Get:110 http://ftpmaster.internal/ubuntu resolute/universe amd64 libogdi4.1 amd64 4.1.1+ds-5 [219 kB] 96s Get:111 http://ftpmaster.internal/ubuntu resolute/main amd64 libopenjp2-7 amd64 2.5.4-1 [188 kB] 96s Get:112 http://ftpmaster.internal/ubuntu resolute/main amd64 libgpgmepp6t64 amd64 1.24.2-3ubuntu2 [124 kB] 96s Get:113 http://ftpmaster.internal/ubuntu resolute/main amd64 liblcms2-2 amd64 2.17-1 [170 kB] 97s Get:114 http://ftpmaster.internal/ubuntu resolute/main amd64 libpoppler147 amd64 25.03.0-11.1 [1224 kB] 97s Get:115 http://ftpmaster.internal/ubuntu resolute/main amd64 libpq5 amd64 18.1-2 [155 kB] 97s Get:116 http://ftpmaster.internal/ubuntu resolute/universe amd64 libqhull-r8.0 amd64 2020.2-8 [197 kB] 97s Get:117 http://ftpmaster.internal/ubuntu resolute/universe amd64 librttopo1 amd64 1.1.0-4 [205 kB] 97s Get:118 http://ftpmaster.internal/ubuntu resolute/universe amd64 libspatialite8t64 amd64 5.1.0-3ubuntu1 [1927 kB] 97s Get:119 http://ftpmaster.internal/ubuntu resolute/universe amd64 libxerces-c3.2t64 amd64 3.2.4+debian-1.3build2 [991 kB] 97s Get:120 http://ftpmaster.internal/ubuntu resolute/universe amd64 libgdal36 amd64 3.10.3+dfsg-1build3 [9647 kB] 97s Get:121 http://ftpmaster.internal/ubuntu resolute/main amd64 libjson-perl all 4.10000-1 [81.9 kB] 97s Get:122 http://ftpmaster.internal/ubuntu resolute/main amd64 liblua5.4-0 amd64 5.4.8-1 [174 kB] 97s Get:123 http://ftpmaster.internal/ubuntu resolute/universe amd64 libnorm1t64 amd64 1.5.9+dfsg-4 [158 kB] 97s Get:124 http://ftpmaster.internal/ubuntu resolute/universe amd64 libpgm-5.3-0t64 amd64 5.3.128~dfsg-2.1build2 [168 kB] 97s Get:125 http://ftpmaster.internal/ubuntu resolute/main amd64 libsodium23 amd64 1.0.18-2 [165 kB] 97s Get:126 http://ftpmaster.internal/ubuntu resolute/universe amd64 libzmq5 amd64 4.3.5-1build3 [262 kB] 97s Get:127 http://ftpmaster.internal/ubuntu resolute/universe amd64 node-fortawesome-fontawesome-free all 6.7.2+ds1-1 [1653 kB] 97s Get:128 http://ftpmaster.internal/ubuntu resolute/universe amd64 pandoc-data all 3.1.11.1-3build1 [78.8 kB] 97s Get:129 http://ftpmaster.internal/ubuntu resolute/universe amd64 pandoc amd64 3.1.11.1+ds-4 [27.2 MB] 98s Get:130 http://ftpmaster.internal/ubuntu resolute/universe amd64 pybuild-plugin-autopkgtest all 7.20251231 [1748 B] 98s Get:131 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pyproject-hooks all 1.2.0-1 [10.2 kB] 98s Get:132 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-wheel all 0.46.1-2 [22.1 kB] 98s Get:133 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-build all 1.2.2-5 [30.9 kB] 98s Get:134 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-installer all 0.7.0+dfsg1-3 [17.4 kB] 98s Get:135 http://ftpmaster.internal/ubuntu resolute/universe amd64 pybuild-plugin-pyproject all 7.20251231 [1714 B] 98s Get:136 http://ftpmaster.internal/ubuntu resolute/universe amd64 python-pystac-doc all 1.14.3-1 [2276 kB] 98s Get:137 http://ftpmaster.internal/ubuntu resolute/universe amd64 python-tinycss2-common all 1.5.1-1 [47.3 kB] 98s Get:138 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-accessible-pygments all 0.0.5-2build1 [790 kB] 98s Get:139 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-affine all 2.4.0-2 [14.0 kB] 98s Get:140 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 python3-all amd64 3.14.2-1 [890 B] 98s Get:141 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-sniffio all 1.3.1-1 [7262 B] 98s Get:142 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-anyio all 4.11.0-3 [72.6 kB] 98s Get:143 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-astroid all 4.0.2-1ubuntu1 [172 kB] 98s Get:144 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-asttokens all 3.0.1-1 [20.7 kB] 98s Get:145 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-webencodings all 0.5.1-5build1 [11.7 kB] 98s Get:146 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-html5lib all 1.2-3 [90.6 kB] 98s Get:147 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-bleach all 6.3.0-1 [44.2 kB] 98s Get:148 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-soupsieve all 2.8.1-1 [33.7 kB] 98s Get:149 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-bs4 all 4.14.3-2build1 [84.8 kB] 98s Get:150 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-click all 8.2.0+0.really.8.1.8-1build1 [80.2 kB] 98s Get:151 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-click-plugins all 1.1.1-5 [9760 B] 98s Get:152 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-cligj all 0.7.2-3 [8006 B] 98s Get:153 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-colorama all 0.4.6-4build1 [32.2 kB] 98s Get:154 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-decorator all 5.2.1-2 [28.1 kB] 98s Get:155 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-defusedxml all 0.7.1-3build1 [42.4 kB] 98s Get:156 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-roman-numerals all 4.1.0-1 [8660 B] 98s Get:157 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-docutils all 0.22.4+dfsg-1 [439 kB] 98s Get:158 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-executing all 2.2.1-0.1 [26.2 kB] 98s Get:159 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-fastjsonschema all 2.21.1-1 [20.4 kB] 98s Get:160 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-h11 all 0.14.0-1.1 [51.6 kB] 98s Get:161 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-imagesize all 1.4.1-1build1 [6900 B] 98s Get:162 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-iniconfig all 2.1.0-2 [6962 B] 98s Get:163 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-parso all 0.8.5-1 [68.0 kB] 98s Get:164 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-typeshed all 0.0~git20241223.ea91db2-4 [1554 kB] 98s Get:165 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-jedi all 0.19.1+ds1-1build1 [694 kB] 98s Get:166 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-traitlets all 5.14.3+really5.14.3-2 [71.7 kB] 98s Get:167 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-matplotlib-inline all 0.2.1-1 [9462 B] 98s Get:168 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-wcwidth all 0.2.14+dfsg1-1build1 [26.5 kB] 98s Get:169 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-prompt-toolkit all 3.0.52-2 [258 kB] 98s Get:170 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pure-eval all 0.2.3-1 [11.4 kB] 98s Get:171 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-stack-data all 0.6.3-3 [22.2 kB] 98s Get:172 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-ipython all 8.35.0-2 [575 kB] 98s Get:173 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-platformdirs all 4.5.1-1 [17.1 kB] 98s Get:174 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-jupyter-core all 5.9.1-1 [28.9 kB] 98s Get:175 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-psutil amd64 7.1.0-1ubuntu1 [191 kB] 98s Get:176 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-tornado amd64 6.5.4-0.1 [306 kB] 98s Get:177 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-zmq amd64 27.1.0-1 [234 kB] 98s Get:178 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-jupyter-client all 8.7.0-1 [78.5 kB] 98s Get:179 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-jupyterlab-pygments all 0.2.2-3build1 [6188 B] 98s Get:180 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-livereload all 2.7.1-0.1 [22.7 kB] 98s Get:181 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-mistune all 3.1.4-1 [35.0 kB] 98s Get:182 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-multidict amd64 6.4.3-1build1 [69.2 kB] 98s Get:183 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-nbformat all 5.10.4-1 [39.2 kB] 98s Get:184 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-nbclient all 0.10.4-1 [22.6 kB] 98s Get:185 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-tinycss2 all 1.5.1-1 [23.3 kB] 98s Get:186 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pandocfilters all 1.5.1-1 [23.6 kB] 98s Get:187 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-nbconvert all 7.16.6-1 [140 kB] 98s Get:188 http://ftpmaster.internal/ubuntu resolute/main amd64 sphinx-common all 8.2.3-12 [657 kB] 98s Get:189 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-alabaster all 0.7.16-0.1build1 [18.6 kB] 98s Get:190 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-snowballstemmer all 3.0.1-1 [65.9 kB] 98s Get:191 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-sphinx all 8.2.3-12 [483 kB] 98s Get:192 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-nbsphinx all 0.9.5+ds-1 [41.0 kB] 98s Get:193 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pluggy all 1.6.0-2 [21.1 kB] 98s Get:194 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-propcache amd64 0.3.1-1build1 [54.5 kB] 98s Get:195 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pydata-sphinx-theme all 0.16.1+dfsg-5 [944 kB] 98s Get:196 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pystac all 1.14.3-1 [150 kB] 98s Get:197 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pytest all 9.0.2-2 [277 kB] 98s Get:198 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pytest-mock all 3.15.1-1 [11.9 kB] 98s Get:199 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-wrapt amd64 1.17.3-3 [40.5 kB] 98s Get:200 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-yarl amd64 1.22.0-1 [98.2 kB] 98s Get:201 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-vcr all 7.0.0-2 [33.3 kB] 98s Get:202 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pytest-recording all 0.13.4-1 [15.9 kB] 98s Get:203 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-rasterio amd64 1.4.3-2build2 [2020 kB] 98s Get:204 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-requests-mock all 1.12.1-4 [17.9 kB] 98s Get:205 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-shapely amd64 2.1.2-1ubuntu1 [408 kB] 98s Get:206 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-starlette all 0.50.0-1 [53.0 kB] 98s Get:207 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-uvloop amd64 0.22.1+ds1-2 [882 kB] 98s Get:208 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-wsproto all 1.3.2-1 [21.8 kB] 98s Get:209 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-uvicorn all 0.38.0-1 [45.9 kB] 99s Get:210 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-watchfiles amd64 1.1.1-2 [404 kB] 99s Get:211 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-websockets amd64 15.0.1-1build1 [98.4 kB] 99s Get:212 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-sphinx-autobuild all 2025.08.25-1 [12.0 kB] 99s Get:213 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-sphinx-design all 0.7.0-1 [896 kB] 99s Get:214 http://ftpmaster.internal/ubuntu resolute/main amd64 libjs-mathjax all 2.7.9+dfsg-1build1 [6017 kB] 99s Fetched 184 MB in 7s (28.2 MB/s) 99s Selecting previously unselected package python3.13-minimal. 99s (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 ... 124953 files and directories currently installed.) 99s Preparing to unpack .../000-python3.13-minimal_3.13.11-1_amd64.deb ... 99s Unpacking python3.13-minimal (3.13.11-1) ... 99s Selecting previously unselected package python3-numpy-dev:amd64. 99s Preparing to unpack .../001-python3-numpy-dev_1%3a2.3.5+ds-3_amd64.deb ... 99s Unpacking python3-numpy-dev:amd64 (1:2.3.5+ds-3) ... 99s Selecting previously unselected package libblas3:amd64. 99s Preparing to unpack .../002-libblas3_3.12.1-7ubuntu1_amd64.deb ... 99s Unpacking libblas3:amd64 (3.12.1-7ubuntu1) ... 99s Selecting previously unselected package libgfortran5:amd64. 99s Preparing to unpack .../003-libgfortran5_15.2.0-11ubuntu1_amd64.deb ... 99s Unpacking libgfortran5:amd64 (15.2.0-11ubuntu1) ... 99s Selecting previously unselected package liblapack3:amd64. 99s Preparing to unpack .../004-liblapack3_3.12.1-7ubuntu1_amd64.deb ... 99s Unpacking liblapack3:amd64 (3.12.1-7ubuntu1) ... 99s Selecting previously unselected package python3-numpy. 99s Preparing to unpack .../005-python3-numpy_1%3a2.3.5+ds-3_amd64.deb ... 99s Unpacking python3-numpy (1:2.3.5+ds-3) ... 99s Selecting previously unselected package python3.13. 99s Preparing to unpack .../006-python3.13_3.13.11-1_amd64.deb ... 99s Unpacking python3.13 (3.13.11-1) ... 99s Selecting previously unselected package m4. 99s Preparing to unpack .../007-m4_1.4.20-2_amd64.deb ... 99s Unpacking m4 (1.4.20-2) ... 99s Selecting previously unselected package autoconf. 99s Preparing to unpack .../008-autoconf_2.72-3.1ubuntu1_all.deb ... 99s Unpacking autoconf (2.72-3.1ubuntu1) ... 99s Selecting previously unselected package autotools-dev. 99s Preparing to unpack .../009-autotools-dev_20240727.1_all.deb ... 99s Unpacking autotools-dev (20240727.1) ... 99s Selecting previously unselected package automake. 99s Preparing to unpack .../010-automake_1%3a1.18.1-3build1_all.deb ... 99s Unpacking automake (1:1.18.1-3build1) ... 99s Selecting previously unselected package autopoint. 99s Preparing to unpack .../011-autopoint_0.23.2-1_all.deb ... 99s Unpacking autopoint (0.23.2-1) ... 99s Selecting previously unselected package libisl23:amd64. 99s Preparing to unpack .../012-libisl23_0.27-1build1_amd64.deb ... 99s Unpacking libisl23:amd64 (0.27-1build1) ... 99s Selecting previously unselected package libmpc3:amd64. 99s Preparing to unpack .../013-libmpc3_1.3.1-2_amd64.deb ... 99s Unpacking libmpc3:amd64 (1.3.1-2) ... 99s Selecting previously unselected package cpp-15-x86-64-linux-gnu. 99s Preparing to unpack .../014-cpp-15-x86-64-linux-gnu_15.2.0-11ubuntu1_amd64.deb ... 99s Unpacking cpp-15-x86-64-linux-gnu (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package cpp-15. 100s Preparing to unpack .../015-cpp-15_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking cpp-15 (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package cpp-x86-64-linux-gnu. 100s Preparing to unpack .../016-cpp-x86-64-linux-gnu_4%3a15.2.0-4ubuntu1_amd64.deb ... 100s Unpacking cpp-x86-64-linux-gnu (4:15.2.0-4ubuntu1) ... 100s Selecting previously unselected package cpp. 100s Preparing to unpack .../017-cpp_4%3a15.2.0-4ubuntu1_amd64.deb ... 100s Unpacking cpp (4:15.2.0-4ubuntu1) ... 100s Selecting previously unselected package libcc1-0:amd64. 100s Preparing to unpack .../018-libcc1-0_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking libcc1-0:amd64 (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package libgomp1:amd64. 100s Preparing to unpack .../019-libgomp1_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking libgomp1:amd64 (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package libitm1:amd64. 100s Preparing to unpack .../020-libitm1_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking libitm1:amd64 (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package libasan8:amd64. 100s Preparing to unpack .../021-libasan8_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking libasan8:amd64 (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package liblsan0:amd64. 100s Preparing to unpack .../022-liblsan0_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking liblsan0:amd64 (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package libtsan2:amd64. 100s Preparing to unpack .../023-libtsan2_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking libtsan2:amd64 (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package libubsan1:amd64. 100s Preparing to unpack .../024-libubsan1_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking libubsan1:amd64 (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package libhwasan0:amd64. 100s Preparing to unpack .../025-libhwasan0_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking libhwasan0:amd64 (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package libquadmath0:amd64. 100s Preparing to unpack .../026-libquadmath0_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking libquadmath0:amd64 (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package libgcc-15-dev:amd64. 100s Preparing to unpack .../027-libgcc-15-dev_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking libgcc-15-dev:amd64 (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package gcc-15-x86-64-linux-gnu. 100s Preparing to unpack .../028-gcc-15-x86-64-linux-gnu_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking gcc-15-x86-64-linux-gnu (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package gcc-15. 100s Preparing to unpack .../029-gcc-15_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking gcc-15 (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package gcc-x86-64-linux-gnu. 100s Preparing to unpack .../030-gcc-x86-64-linux-gnu_4%3a15.2.0-4ubuntu1_amd64.deb ... 100s Unpacking gcc-x86-64-linux-gnu (4:15.2.0-4ubuntu1) ... 100s Selecting previously unselected package gcc. 100s Preparing to unpack .../031-gcc_4%3a15.2.0-4ubuntu1_amd64.deb ... 100s Unpacking gcc (4:15.2.0-4ubuntu1) ... 100s Selecting previously unselected package libstdc++-15-dev:amd64. 100s Preparing to unpack .../032-libstdc++-15-dev_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking libstdc++-15-dev:amd64 (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package g++-15-x86-64-linux-gnu. 100s Preparing to unpack .../033-g++-15-x86-64-linux-gnu_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking g++-15-x86-64-linux-gnu (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package g++-15. 100s Preparing to unpack .../034-g++-15_15.2.0-11ubuntu1_amd64.deb ... 100s Unpacking g++-15 (15.2.0-11ubuntu1) ... 100s Selecting previously unselected package g++-x86-64-linux-gnu. 100s Preparing to unpack .../035-g++-x86-64-linux-gnu_4%3a15.2.0-4ubuntu1_amd64.deb ... 100s Unpacking g++-x86-64-linux-gnu (4:15.2.0-4ubuntu1) ... 100s Selecting previously unselected package g++. 100s Preparing to unpack .../036-g++_4%3a15.2.0-4ubuntu1_amd64.deb ... 100s Unpacking g++ (4:15.2.0-4ubuntu1) ... 100s Selecting previously unselected package build-essential. 100s Preparing to unpack .../037-build-essential_12.12ubuntu2_amd64.deb ... 100s Unpacking build-essential (12.12ubuntu2) ... 100s Selecting previously unselected package libdebhelper-perl. 100s Preparing to unpack .../038-libdebhelper-perl_13.28ubuntu1_all.deb ... 100s Unpacking libdebhelper-perl (13.28ubuntu1) ... 100s Selecting previously unselected package libtool. 100s Preparing to unpack .../039-libtool_2.5.4-9_all.deb ... 100s Unpacking libtool (2.5.4-9) ... 100s Selecting previously unselected package dh-autoreconf. 100s Preparing to unpack .../040-dh-autoreconf_21_all.deb ... 100s Unpacking dh-autoreconf (21) ... 100s Selecting previously unselected package libarchive-zip-perl. 100s Preparing to unpack .../041-libarchive-zip-perl_1.68-1_all.deb ... 100s Unpacking libarchive-zip-perl (1.68-1) ... 101s Selecting previously unselected package libfile-stripnondeterminism-perl. 101s Preparing to unpack .../042-libfile-stripnondeterminism-perl_1.15.0-1build1_all.deb ... 101s Unpacking libfile-stripnondeterminism-perl (1.15.0-1build1) ... 101s Selecting previously unselected package dh-strip-nondeterminism. 101s Preparing to unpack .../043-dh-strip-nondeterminism_1.15.0-1build1_all.deb ... 101s Unpacking dh-strip-nondeterminism (1.15.0-1build1) ... 101s Selecting previously unselected package debugedit. 101s Preparing to unpack .../044-debugedit_1%3a5.2-3_amd64.deb ... 101s Unpacking debugedit (1:5.2-3) ... 101s Selecting previously unselected package dwz. 101s Preparing to unpack .../045-dwz_0.16-2_amd64.deb ... 101s Unpacking dwz (0.16-2) ... 101s Selecting previously unselected package gettext. 101s Preparing to unpack .../046-gettext_0.23.2-1_amd64.deb ... 101s Unpacking gettext (0.23.2-1) ... 101s Selecting previously unselected package intltool-debian. 101s Preparing to unpack .../047-intltool-debian_0.35.0+20060710.6build1_all.deb ... 101s Unpacking intltool-debian (0.35.0+20060710.6build1) ... 101s Selecting previously unselected package po-debconf. 101s Preparing to unpack .../048-po-debconf_1.0.22_all.deb ... 101s Unpacking po-debconf (1.0.22) ... 101s Selecting previously unselected package debhelper. 101s Preparing to unpack .../049-debhelper_13.28ubuntu1_all.deb ... 101s Unpacking debhelper (13.28ubuntu1) ... 101s Selecting previously unselected package dh-python. 101s Preparing to unpack .../050-dh-python_7.20251231_all.deb ... 101s Unpacking dh-python (7.20251231) ... 101s Selecting previously unselected package sgml-base. 101s Preparing to unpack .../051-sgml-base_1.31+nmu1_all.deb ... 101s Unpacking sgml-base (1.31+nmu1) ... 101s Selecting previously unselected package xml-core. 101s Preparing to unpack .../052-xml-core_0.19build1_all.deb ... 101s Unpacking xml-core (0.19build1) ... 101s Selecting previously unselected package docutils-common. 101s Preparing to unpack .../053-docutils-common_0.22.4+dfsg-1_all.deb ... 101s Unpacking docutils-common (0.22.4+dfsg-1) ... 101s Selecting previously unselected package fonts-dejavu-mono. 101s Preparing to unpack .../054-fonts-dejavu-mono_2.37-8build1_all.deb ... 101s Unpacking fonts-dejavu-mono (2.37-8build1) ... 101s Selecting previously unselected package fonts-dejavu-core. 101s Preparing to unpack .../055-fonts-dejavu-core_2.37-8build1_all.deb ... 101s Unpacking fonts-dejavu-core (2.37-8build1) ... 101s Selecting previously unselected package fontconfig-config. 101s Preparing to unpack .../056-fontconfig-config_2.15.0-2.4ubuntu1_amd64.deb ... 101s Unpacking fontconfig-config (2.15.0-2.4ubuntu1) ... 101s Selecting previously unselected package fonts-mathjax. 101s Preparing to unpack .../057-fonts-mathjax_2.7.9+dfsg-1build1_all.deb ... 101s Unpacking fonts-mathjax (2.7.9+dfsg-1build1) ... 101s Selecting previously unselected package gdal-data. 101s Preparing to unpack .../058-gdal-data_3.12.1+dfsg-1_all.deb ... 101s Unpacking gdal-data (3.12.1+dfsg-1) ... 101s Selecting previously unselected package gdal-plugins:amd64. 101s Preparing to unpack .../059-gdal-plugins_3.12.1+dfsg-1_amd64.deb ... 101s Unpacking gdal-plugins:amd64 (3.12.1+dfsg-1) ... 101s Selecting previously unselected package libabsl20260107:amd64. 101s Preparing to unpack .../060-libabsl20260107_20260107.0-0ubuntu2_amd64.deb ... 101s Unpacking libabsl20260107:amd64 (20260107.0-0ubuntu2) ... 101s Selecting previously unselected package libaec0:amd64. 101s Preparing to unpack .../061-libaec0_1.1.4-2_amd64.deb ... 101s Unpacking libaec0:amd64 (1.1.4-2) ... 101s Selecting previously unselected package libaom3:amd64. 101s Preparing to unpack .../062-libaom3_3.13.1-2_amd64.deb ... 101s Unpacking libaom3:amd64 (3.13.1-2) ... 101s Selecting previously unselected package libarpack2t64:amd64. 101s Preparing to unpack .../063-libarpack2t64_3.9.1-6_amd64.deb ... 101s Unpacking libarpack2t64:amd64 (3.9.1-6) ... 101s Selecting previously unselected package libarmadillo14. 101s Preparing to unpack .../064-libarmadillo14_1%3a14.2.3+dfsg-1_amd64.deb ... 101s Unpacking libarmadillo14 (1:14.2.3+dfsg-1) ... 101s Selecting previously unselected package libdav1d7:amd64. 101s Preparing to unpack .../065-libdav1d7_1.5.3-1_amd64.deb ... 101s Unpacking libdav1d7:amd64 (1.5.3-1) ... 101s Selecting previously unselected package libgav1-2:amd64. 101s Preparing to unpack .../066-libgav1-2_0.20.0-2build1_amd64.deb ... 101s Unpacking libgav1-2:amd64 (0.20.0-2build1) ... 101s Selecting previously unselected package libjpeg-turbo8:amd64. 101s Preparing to unpack .../067-libjpeg-turbo8_2.1.5-4ubuntu2_amd64.deb ... 101s Unpacking libjpeg-turbo8:amd64 (2.1.5-4ubuntu2) ... 101s Selecting previously unselected package libjpeg8:amd64. 101s Preparing to unpack .../068-libjpeg8_8c-2ubuntu11_amd64.deb ... 101s Unpacking libjpeg8:amd64 (8c-2ubuntu11) ... 101s Selecting previously unselected package libyuv0:amd64. 101s Preparing to unpack .../069-libyuv0_0.0.1922.20260106-1_amd64.deb ... 101s Unpacking libyuv0:amd64 (0.0.1922.20260106-1) ... 101s Selecting previously unselected package libavif16:amd64. 101s Preparing to unpack .../070-libavif16_1.3.0-1ubuntu3_amd64.deb ... 101s Unpacking libavif16:amd64 (1.3.0-1ubuntu3) ... 101s Selecting previously unselected package libsnappy1v5:amd64. 101s Preparing to unpack .../071-libsnappy1v5_1.2.2-2_amd64.deb ... 101s Unpacking libsnappy1v5:amd64 (1.2.2-2) ... 101s Selecting previously unselected package libblosc1:amd64. 101s Preparing to unpack .../072-libblosc1_1.21.5+ds-2_amd64.deb ... 101s Unpacking libblosc1:amd64 (1.21.5+ds-2) ... 101s Selecting previously unselected package libcfitsio10t64:amd64. 101s Preparing to unpack .../073-libcfitsio10t64_4.6.3-1_amd64.deb ... 101s Unpacking libcfitsio10t64:amd64 (4.6.3-1) ... 101s Selecting previously unselected package libde265-0:amd64. 101s Preparing to unpack .../074-libde265-0_1.0.16-1build1_amd64.deb ... 101s Unpacking libde265-0:amd64 (1.0.16-1build1) ... 101s Selecting previously unselected package libdeflate0:amd64. 101s Preparing to unpack .../075-libdeflate0_1.23-2_amd64.deb ... 101s Unpacking libdeflate0:amd64 (1.23-2) ... 101s Selecting previously unselected package libfontconfig1:amd64. 101s Preparing to unpack .../076-libfontconfig1_2.15.0-2.4ubuntu1_amd64.deb ... 101s Unpacking libfontconfig1:amd64 (2.15.0-2.4ubuntu1) ... 101s Selecting previously unselected package libfyba0t64:amd64. 101s Preparing to unpack .../077-libfyba0t64_4.1.1-11build2_amd64.deb ... 101s Unpacking libfyba0t64:amd64 (4.1.1-11build2) ... 101s Selecting previously unselected package libminizip1t64:amd64. 101s Preparing to unpack .../078-libminizip1t64_1%3a1.3.dfsg+really1.3.1-1ubuntu2_amd64.deb ... 101s Unpacking libminizip1t64:amd64 (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 101s Selecting previously unselected package libfreexl1:amd64. 101s Preparing to unpack .../079-libfreexl1_2.0.0-1build3_amd64.deb ... 101s Unpacking libfreexl1:amd64 (2.0.0-1build3) ... 101s Selecting previously unselected package libgeos3.14.1:amd64. 101s Preparing to unpack .../080-libgeos3.14.1_3.14.1-2_amd64.deb ... 101s Unpacking libgeos3.14.1:amd64 (3.14.1-2) ... 101s Selecting previously unselected package libgeos-c1t64:amd64. 101s Preparing to unpack .../081-libgeos-c1t64_3.14.1-2_amd64.deb ... 101s Unpacking libgeos-c1t64:amd64 (3.14.1-2) ... 101s Selecting previously unselected package proj-data. 101s Preparing to unpack .../082-proj-data_9.7.1-1_all.deb ... 101s Unpacking proj-data (9.7.1-1) ... 101s Selecting previously unselected package libjbig0:amd64. 101s Preparing to unpack .../083-libjbig0_2.1-6.1ubuntu3_amd64.deb ... 101s Unpacking libjbig0:amd64 (2.1-6.1ubuntu3) ... 101s Selecting previously unselected package liblerc4:amd64. 101s Preparing to unpack .../084-liblerc4_4.0.0+ds-5ubuntu2_amd64.deb ... 101s Unpacking liblerc4:amd64 (4.0.0+ds-5ubuntu2) ... 101s Selecting previously unselected package libsharpyuv0:amd64. 101s Preparing to unpack .../085-libsharpyuv0_1.5.0-0.1build1_amd64.deb ... 101s Unpacking libsharpyuv0:amd64 (1.5.0-0.1build1) ... 101s Selecting previously unselected package libwebp7:amd64. 101s Preparing to unpack .../086-libwebp7_1.5.0-0.1build1_amd64.deb ... 101s Unpacking libwebp7:amd64 (1.5.0-0.1build1) ... 101s Selecting previously unselected package libtiff6:amd64. 101s Preparing to unpack .../087-libtiff6_4.7.0-3ubuntu3_amd64.deb ... 101s Unpacking libtiff6:amd64 (4.7.0-3ubuntu3) ... 101s Selecting previously unselected package libproj25:amd64. 101s Preparing to unpack .../088-libproj25_9.7.1-1_amd64.deb ... 101s Unpacking libproj25:amd64 (9.7.1-1) ... 101s Selecting previously unselected package libgeotiff5:amd64. 101s Preparing to unpack .../089-libgeotiff5_1.7.4-1_amd64.deb ... 101s Unpacking libgeotiff5:amd64 (1.7.4-1) ... 101s Selecting previously unselected package libgif7:amd64. 102s Preparing to unpack .../090-libgif7_5.2.2-1ubuntu3_amd64.deb ... 102s Unpacking libgif7:amd64 (5.2.2-1ubuntu3) ... 102s Selecting previously unselected package libsz2:amd64. 102s Preparing to unpack .../091-libsz2_1.1.4-2_amd64.deb ... 102s Unpacking libsz2:amd64 (1.1.4-2) ... 102s Selecting previously unselected package libhdf4-0-alt:amd64. 102s Preparing to unpack .../092-libhdf4-0-alt_4.3.0-1_amd64.deb ... 102s Unpacking libhdf4-0-alt:amd64 (4.3.0-1) ... 102s Selecting previously unselected package libhdf5-310:amd64. 102s Preparing to unpack .../093-libhdf5-310_1.14.6+repack-2_amd64.deb ... 102s Unpacking libhdf5-310:amd64 (1.14.6+repack-2) ... 102s Selecting previously unselected package libheif-plugin-aomdec:amd64. 102s Preparing to unpack .../094-libheif-plugin-aomdec_1.21.2-1_amd64.deb ... 102s Unpacking libheif-plugin-aomdec:amd64 (1.21.2-1) ... 102s Selecting previously unselected package libheif-plugin-libde265:amd64. 102s Preparing to unpack .../095-libheif-plugin-libde265_1.21.2-1_amd64.deb ... 102s Unpacking libheif-plugin-libde265:amd64 (1.21.2-1) ... 102s Selecting previously unselected package libheif1:amd64. 102s Preparing to unpack .../096-libheif1_1.21.2-1_amd64.deb ... 102s Unpacking libheif1:amd64 (1.21.2-1) ... 102s Selecting previously unselected package liburiparser1:amd64. 102s Preparing to unpack .../097-liburiparser1_0.9.8+dfsg-2_amd64.deb ... 102s Unpacking liburiparser1:amd64 (0.9.8+dfsg-2) ... 102s Selecting previously unselected package libkmlbase1t64:amd64. 102s Preparing to unpack .../098-libkmlbase1t64_1.3.0-13_amd64.deb ... 102s Unpacking libkmlbase1t64:amd64 (1.3.0-13) ... 102s Selecting previously unselected package libkmldom1t64:amd64. 102s Preparing to unpack .../099-libkmldom1t64_1.3.0-13_amd64.deb ... 102s Unpacking libkmldom1t64:amd64 (1.3.0-13) ... 102s Selecting previously unselected package libkmlengine1t64:amd64. 102s Preparing to unpack .../100-libkmlengine1t64_1.3.0-13_amd64.deb ... 102s Unpacking libkmlengine1t64:amd64 (1.3.0-13) ... 102s Selecting previously unselected package mysql-common. 102s Preparing to unpack .../101-mysql-common_5.8+1.1.1ubuntu2_all.deb ... 102s Unpacking mysql-common (5.8+1.1.1ubuntu2) ... 102s Selecting previously unselected package libmysqlclient24:amd64. 102s Preparing to unpack .../102-libmysqlclient24_8.4.7-0ubuntu3_amd64.deb ... 102s Unpacking libmysqlclient24:amd64 (8.4.7-0ubuntu3) ... 102s Selecting previously unselected package libhdf5-hl-310:amd64. 102s Preparing to unpack .../103-libhdf5-hl-310_1.14.6+repack-2_amd64.deb ... 102s Unpacking libhdf5-hl-310:amd64 (1.14.6+repack-2) ... 102s Selecting previously unselected package libnetcdf22:amd64. 102s Preparing to unpack .../104-libnetcdf22_1%3a4.9.3-1build1_amd64.deb ... 102s Unpacking libnetcdf22:amd64 (1:4.9.3-1build1) ... 102s Selecting previously unselected package libltdl7:amd64. 102s Preparing to unpack .../105-libltdl7_2.5.4-9_amd64.deb ... 102s Unpacking libltdl7:amd64 (2.5.4-9) ... 102s Selecting previously unselected package libodbc2:amd64. 102s Preparing to unpack .../106-libodbc2_2.3.14-1_amd64.deb ... 102s Unpacking libodbc2:amd64 (2.3.14-1) ... 102s Selecting previously unselected package unixodbc-common. 102s Preparing to unpack .../107-unixodbc-common_2.3.14-1_all.deb ... 102s Unpacking unixodbc-common (2.3.14-1) ... 102s Selecting previously unselected package libodbcinst2:amd64. 102s Preparing to unpack .../108-libodbcinst2_2.3.14-1_amd64.deb ... 102s Unpacking libodbcinst2:amd64 (2.3.14-1) ... 102s Selecting previously unselected package libogdi4.1:amd64. 102s Preparing to unpack .../109-libogdi4.1_4.1.1+ds-5_amd64.deb ... 102s Unpacking libogdi4.1:amd64 (4.1.1+ds-5) ... 102s Selecting previously unselected package libopenjp2-7:amd64. 102s Preparing to unpack .../110-libopenjp2-7_2.5.4-1_amd64.deb ... 102s Unpacking libopenjp2-7:amd64 (2.5.4-1) ... 102s Selecting previously unselected package libgpgmepp6t64:amd64. 102s Preparing to unpack .../111-libgpgmepp6t64_1.24.2-3ubuntu2_amd64.deb ... 102s Unpacking libgpgmepp6t64:amd64 (1.24.2-3ubuntu2) ... 102s Selecting previously unselected package liblcms2-2:amd64. 102s Preparing to unpack .../112-liblcms2-2_2.17-1_amd64.deb ... 102s Unpacking liblcms2-2:amd64 (2.17-1) ... 102s Selecting previously unselected package libpoppler147:amd64. 102s Preparing to unpack .../113-libpoppler147_25.03.0-11.1_amd64.deb ... 102s Unpacking libpoppler147:amd64 (25.03.0-11.1) ... 102s Selecting previously unselected package libpq5:amd64. 102s Preparing to unpack .../114-libpq5_18.1-2_amd64.deb ... 102s Unpacking libpq5:amd64 (18.1-2) ... 102s Selecting previously unselected package libqhull-r8.0:amd64. 102s Preparing to unpack .../115-libqhull-r8.0_2020.2-8_amd64.deb ... 102s Unpacking libqhull-r8.0:amd64 (2020.2-8) ... 102s Selecting previously unselected package librttopo1:amd64. 102s Preparing to unpack .../116-librttopo1_1.1.0-4_amd64.deb ... 102s Unpacking librttopo1:amd64 (1.1.0-4) ... 102s Selecting previously unselected package libspatialite8t64:amd64. 102s Preparing to unpack .../117-libspatialite8t64_5.1.0-3ubuntu1_amd64.deb ... 102s Unpacking libspatialite8t64:amd64 (5.1.0-3ubuntu1) ... 102s Selecting previously unselected package libxerces-c3.2t64:amd64. 102s Preparing to unpack .../118-libxerces-c3.2t64_3.2.4+debian-1.3build2_amd64.deb ... 102s Unpacking libxerces-c3.2t64:amd64 (3.2.4+debian-1.3build2) ... 102s Selecting previously unselected package libgdal36:amd64. 102s Preparing to unpack .../119-libgdal36_3.10.3+dfsg-1build3_amd64.deb ... 102s Unpacking libgdal36:amd64 (3.10.3+dfsg-1build3) ... 102s Selecting previously unselected package libjson-perl. 102s Preparing to unpack .../120-libjson-perl_4.10000-1_all.deb ... 102s Unpacking libjson-perl (4.10000-1) ... 102s Selecting previously unselected package liblua5.4-0:amd64. 102s Preparing to unpack .../121-liblua5.4-0_5.4.8-1_amd64.deb ... 102s Unpacking liblua5.4-0:amd64 (5.4.8-1) ... 102s Selecting previously unselected package libnorm1t64:amd64. 102s Preparing to unpack .../122-libnorm1t64_1.5.9+dfsg-4_amd64.deb ... 102s Unpacking libnorm1t64:amd64 (1.5.9+dfsg-4) ... 102s Selecting previously unselected package libpgm-5.3-0t64:amd64. 102s Preparing to unpack .../123-libpgm-5.3-0t64_5.3.128~dfsg-2.1build2_amd64.deb ... 102s Unpacking libpgm-5.3-0t64:amd64 (5.3.128~dfsg-2.1build2) ... 102s Selecting previously unselected package libsodium23:amd64. 102s Preparing to unpack .../124-libsodium23_1.0.18-2_amd64.deb ... 102s Unpacking libsodium23:amd64 (1.0.18-2) ... 102s Selecting previously unselected package libzmq5:amd64. 102s Preparing to unpack .../125-libzmq5_4.3.5-1build3_amd64.deb ... 102s Unpacking libzmq5:amd64 (4.3.5-1build3) ... 102s Selecting previously unselected package node-fortawesome-fontawesome-free. 102s Preparing to unpack .../126-node-fortawesome-fontawesome-free_6.7.2+ds1-1_all.deb ... 102s Unpacking node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 102s Selecting previously unselected package pandoc-data. 102s Preparing to unpack .../127-pandoc-data_3.1.11.1-3build1_all.deb ... 102s Unpacking pandoc-data (3.1.11.1-3build1) ... 102s Selecting previously unselected package pandoc. 102s Preparing to unpack .../128-pandoc_3.1.11.1+ds-4_amd64.deb ... 102s Unpacking pandoc (3.1.11.1+ds-4) ... 103s Selecting previously unselected package pybuild-plugin-autopkgtest. 103s Preparing to unpack .../129-pybuild-plugin-autopkgtest_7.20251231_all.deb ... 103s Unpacking pybuild-plugin-autopkgtest (7.20251231) ... 103s Selecting previously unselected package python3-pyproject-hooks. 103s Preparing to unpack .../130-python3-pyproject-hooks_1.2.0-1_all.deb ... 103s Unpacking python3-pyproject-hooks (1.2.0-1) ... 103s Selecting previously unselected package python3-wheel. 103s Preparing to unpack .../131-python3-wheel_0.46.1-2_all.deb ... 103s Unpacking python3-wheel (0.46.1-2) ... 103s Selecting previously unselected package python3-build. 103s Preparing to unpack .../132-python3-build_1.2.2-5_all.deb ... 103s Unpacking python3-build (1.2.2-5) ... 103s Selecting previously unselected package python3-installer. 103s Preparing to unpack .../133-python3-installer_0.7.0+dfsg1-3_all.deb ... 103s Unpacking python3-installer (0.7.0+dfsg1-3) ... 103s Selecting previously unselected package pybuild-plugin-pyproject. 103s Preparing to unpack .../134-pybuild-plugin-pyproject_7.20251231_all.deb ... 103s Unpacking pybuild-plugin-pyproject (7.20251231) ... 103s Selecting previously unselected package python-pystac-doc. 103s Preparing to unpack .../135-python-pystac-doc_1.14.3-1_all.deb ... 103s Unpacking python-pystac-doc (1.14.3-1) ... 103s Selecting previously unselected package python-tinycss2-common. 103s Preparing to unpack .../136-python-tinycss2-common_1.5.1-1_all.deb ... 103s Unpacking python-tinycss2-common (1.5.1-1) ... 103s Selecting previously unselected package python3-accessible-pygments. 103s Preparing to unpack .../137-python3-accessible-pygments_0.0.5-2build1_all.deb ... 103s Unpacking python3-accessible-pygments (0.0.5-2build1) ... 103s Selecting previously unselected package python3-affine. 103s Preparing to unpack .../138-python3-affine_2.4.0-2_all.deb ... 103s Unpacking python3-affine (2.4.0-2) ... 103s Selecting previously unselected package python3-all. 103s Preparing to unpack .../139-python3-all_3.14.2-1_amd64.deb ... 103s Unpacking python3-all (3.14.2-1) ... 103s Selecting previously unselected package python3-sniffio. 103s Preparing to unpack .../140-python3-sniffio_1.3.1-1_all.deb ... 103s Unpacking python3-sniffio (1.3.1-1) ... 103s Selecting previously unselected package python3-anyio. 103s Preparing to unpack .../141-python3-anyio_4.11.0-3_all.deb ... 103s Unpacking python3-anyio (4.11.0-3) ... 103s Selecting previously unselected package python3-astroid. 103s Preparing to unpack .../142-python3-astroid_4.0.2-1ubuntu1_all.deb ... 103s Unpacking python3-astroid (4.0.2-1ubuntu1) ... 103s Selecting previously unselected package python3-asttokens. 103s Preparing to unpack .../143-python3-asttokens_3.0.1-1_all.deb ... 103s Unpacking python3-asttokens (3.0.1-1) ... 103s Selecting previously unselected package python3-webencodings. 103s Preparing to unpack .../144-python3-webencodings_0.5.1-5build1_all.deb ... 103s Unpacking python3-webencodings (0.5.1-5build1) ... 103s Selecting previously unselected package python3-html5lib. 103s Preparing to unpack .../145-python3-html5lib_1.2-3_all.deb ... 103s Unpacking python3-html5lib (1.2-3) ... 103s Selecting previously unselected package python3-bleach. 103s Preparing to unpack .../146-python3-bleach_6.3.0-1_all.deb ... 103s Unpacking python3-bleach (6.3.0-1) ... 103s Selecting previously unselected package python3-soupsieve. 103s Preparing to unpack .../147-python3-soupsieve_2.8.1-1_all.deb ... 103s Unpacking python3-soupsieve (2.8.1-1) ... 103s Selecting previously unselected package python3-bs4. 103s Preparing to unpack .../148-python3-bs4_4.14.3-2build1_all.deb ... 103s Unpacking python3-bs4 (4.14.3-2build1) ... 103s Selecting previously unselected package python3-click. 103s Preparing to unpack .../149-python3-click_8.2.0+0.really.8.1.8-1build1_all.deb ... 103s Unpacking python3-click (8.2.0+0.really.8.1.8-1build1) ... 103s Selecting previously unselected package python3-click-plugins. 103s Preparing to unpack .../150-python3-click-plugins_1.1.1-5_all.deb ... 103s Unpacking python3-click-plugins (1.1.1-5) ... 103s Selecting previously unselected package python3-cligj. 103s Preparing to unpack .../151-python3-cligj_0.7.2-3_all.deb ... 103s Unpacking python3-cligj (0.7.2-3) ... 103s Selecting previously unselected package python3-colorama. 103s Preparing to unpack .../152-python3-colorama_0.4.6-4build1_all.deb ... 103s Unpacking python3-colorama (0.4.6-4build1) ... 103s Selecting previously unselected package python3-decorator. 103s Preparing to unpack .../153-python3-decorator_5.2.1-2_all.deb ... 103s Unpacking python3-decorator (5.2.1-2) ... 103s Selecting previously unselected package python3-defusedxml. 103s Preparing to unpack .../154-python3-defusedxml_0.7.1-3build1_all.deb ... 103s Unpacking python3-defusedxml (0.7.1-3build1) ... 103s Selecting previously unselected package python3-roman-numerals. 103s Preparing to unpack .../155-python3-roman-numerals_4.1.0-1_all.deb ... 103s Unpacking python3-roman-numerals (4.1.0-1) ... 103s Selecting previously unselected package python3-docutils. 103s Preparing to unpack .../156-python3-docutils_0.22.4+dfsg-1_all.deb ... 103s Unpacking python3-docutils (0.22.4+dfsg-1) ... 103s Selecting previously unselected package python3-executing. 103s Preparing to unpack .../157-python3-executing_2.2.1-0.1_all.deb ... 103s Unpacking python3-executing (2.2.1-0.1) ... 103s Selecting previously unselected package python3-fastjsonschema. 103s Preparing to unpack .../158-python3-fastjsonschema_2.21.1-1_all.deb ... 103s Unpacking python3-fastjsonschema (2.21.1-1) ... 103s Selecting previously unselected package python3-h11. 103s Preparing to unpack .../159-python3-h11_0.14.0-1.1_all.deb ... 103s Unpacking python3-h11 (0.14.0-1.1) ... 103s Selecting previously unselected package python3-imagesize. 103s Preparing to unpack .../160-python3-imagesize_1.4.1-1build1_all.deb ... 103s Unpacking python3-imagesize (1.4.1-1build1) ... 103s Selecting previously unselected package python3-iniconfig. 103s Preparing to unpack .../161-python3-iniconfig_2.1.0-2_all.deb ... 103s Unpacking python3-iniconfig (2.1.0-2) ... 103s Selecting previously unselected package python3-parso. 103s Preparing to unpack .../162-python3-parso_0.8.5-1_all.deb ... 103s Unpacking python3-parso (0.8.5-1) ... 103s Selecting previously unselected package python3-typeshed. 103s Preparing to unpack .../163-python3-typeshed_0.0~git20241223.ea91db2-4_all.deb ... 103s Unpacking python3-typeshed (0.0~git20241223.ea91db2-4) ... 103s Selecting previously unselected package python3-jedi. 103s Preparing to unpack .../164-python3-jedi_0.19.1+ds1-1build1_all.deb ... 103s Unpacking python3-jedi (0.19.1+ds1-1build1) ... 104s Selecting previously unselected package python3-traitlets. 104s Preparing to unpack .../165-python3-traitlets_5.14.3+really5.14.3-2_all.deb ... 104s Unpacking python3-traitlets (5.14.3+really5.14.3-2) ... 104s Selecting previously unselected package python3-matplotlib-inline. 104s Preparing to unpack .../166-python3-matplotlib-inline_0.2.1-1_all.deb ... 104s Unpacking python3-matplotlib-inline (0.2.1-1) ... 104s Selecting previously unselected package python3-wcwidth. 104s Preparing to unpack .../167-python3-wcwidth_0.2.14+dfsg1-1build1_all.deb ... 104s Unpacking python3-wcwidth (0.2.14+dfsg1-1build1) ... 104s Selecting previously unselected package python3-prompt-toolkit. 104s Preparing to unpack .../168-python3-prompt-toolkit_3.0.52-2_all.deb ... 104s Unpacking python3-prompt-toolkit (3.0.52-2) ... 104s Selecting previously unselected package python3-pure-eval. 104s Preparing to unpack .../169-python3-pure-eval_0.2.3-1_all.deb ... 104s Unpacking python3-pure-eval (0.2.3-1) ... 104s Selecting previously unselected package python3-stack-data. 104s Preparing to unpack .../170-python3-stack-data_0.6.3-3_all.deb ... 104s Unpacking python3-stack-data (0.6.3-3) ... 104s Selecting previously unselected package python3-ipython. 104s Preparing to unpack .../171-python3-ipython_8.35.0-2_all.deb ... 104s Unpacking python3-ipython (8.35.0-2) ... 104s Selecting previously unselected package python3-platformdirs. 104s Preparing to unpack .../172-python3-platformdirs_4.5.1-1_all.deb ... 104s Unpacking python3-platformdirs (4.5.1-1) ... 104s Selecting previously unselected package python3-jupyter-core. 104s Preparing to unpack .../173-python3-jupyter-core_5.9.1-1_all.deb ... 104s Unpacking python3-jupyter-core (5.9.1-1) ... 104s Selecting previously unselected package python3-psutil. 104s Preparing to unpack .../174-python3-psutil_7.1.0-1ubuntu1_amd64.deb ... 104s Unpacking python3-psutil (7.1.0-1ubuntu1) ... 104s Selecting previously unselected package python3-tornado. 104s Preparing to unpack .../175-python3-tornado_6.5.4-0.1_amd64.deb ... 104s Unpacking python3-tornado (6.5.4-0.1) ... 104s Selecting previously unselected package python3-zmq. 104s Preparing to unpack .../176-python3-zmq_27.1.0-1_amd64.deb ... 104s Unpacking python3-zmq (27.1.0-1) ... 104s Selecting previously unselected package python3-jupyter-client. 104s Preparing to unpack .../177-python3-jupyter-client_8.7.0-1_all.deb ... 104s Unpacking python3-jupyter-client (8.7.0-1) ... 104s Selecting previously unselected package python3-jupyterlab-pygments. 104s Preparing to unpack .../178-python3-jupyterlab-pygments_0.2.2-3build1_all.deb ... 104s Unpacking python3-jupyterlab-pygments (0.2.2-3build1) ... 104s Selecting previously unselected package python3-livereload. 104s Preparing to unpack .../179-python3-livereload_2.7.1-0.1_all.deb ... 104s Unpacking python3-livereload (2.7.1-0.1) ... 104s Selecting previously unselected package python3-mistune. 104s Preparing to unpack .../180-python3-mistune_3.1.4-1_all.deb ... 104s Unpacking python3-mistune (3.1.4-1) ... 104s Selecting previously unselected package python3-multidict. 104s Preparing to unpack .../181-python3-multidict_6.4.3-1build1_amd64.deb ... 104s Unpacking python3-multidict (6.4.3-1build1) ... 104s Selecting previously unselected package python3-nbformat. 104s Preparing to unpack .../182-python3-nbformat_5.10.4-1_all.deb ... 104s Unpacking python3-nbformat (5.10.4-1) ... 104s Selecting previously unselected package python3-nbclient. 104s Preparing to unpack .../183-python3-nbclient_0.10.4-1_all.deb ... 104s Unpacking python3-nbclient (0.10.4-1) ... 104s Selecting previously unselected package python3-tinycss2. 104s Preparing to unpack .../184-python3-tinycss2_1.5.1-1_all.deb ... 104s Unpacking python3-tinycss2 (1.5.1-1) ... 104s Selecting previously unselected package python3-pandocfilters. 104s Preparing to unpack .../185-python3-pandocfilters_1.5.1-1_all.deb ... 104s Unpacking python3-pandocfilters (1.5.1-1) ... 104s Selecting previously unselected package python3-nbconvert. 104s Preparing to unpack .../186-python3-nbconvert_7.16.6-1_all.deb ... 104s Unpacking python3-nbconvert (7.16.6-1) ... 104s Selecting previously unselected package sphinx-common. 104s Preparing to unpack .../187-sphinx-common_8.2.3-12_all.deb ... 104s Unpacking sphinx-common (8.2.3-12) ... 104s Selecting previously unselected package python3-alabaster. 104s Preparing to unpack .../188-python3-alabaster_0.7.16-0.1build1_all.deb ... 104s Unpacking python3-alabaster (0.7.16-0.1build1) ... 104s Selecting previously unselected package python3-snowballstemmer. 104s Preparing to unpack .../189-python3-snowballstemmer_3.0.1-1_all.deb ... 104s Unpacking python3-snowballstemmer (3.0.1-1) ... 104s Selecting previously unselected package python3-sphinx. 104s Preparing to unpack .../190-python3-sphinx_8.2.3-12_all.deb ... 104s Unpacking python3-sphinx (8.2.3-12) ... 104s Selecting previously unselected package python3-nbsphinx. 104s Preparing to unpack .../191-python3-nbsphinx_0.9.5+ds-1_all.deb ... 104s Unpacking python3-nbsphinx (0.9.5+ds-1) ... 104s Selecting previously unselected package python3-pluggy. 104s Preparing to unpack .../192-python3-pluggy_1.6.0-2_all.deb ... 104s Unpacking python3-pluggy (1.6.0-2) ... 104s Selecting previously unselected package python3-propcache. 104s Preparing to unpack .../193-python3-propcache_0.3.1-1build1_amd64.deb ... 104s Unpacking python3-propcache (0.3.1-1build1) ... 104s Selecting previously unselected package python3-pydata-sphinx-theme. 104s Preparing to unpack .../194-python3-pydata-sphinx-theme_0.16.1+dfsg-5_all.deb ... 104s Unpacking python3-pydata-sphinx-theme (0.16.1+dfsg-5) ... 104s Selecting previously unselected package python3-pystac. 104s Preparing to unpack .../195-python3-pystac_1.14.3-1_all.deb ... 104s Unpacking python3-pystac (1.14.3-1) ... 104s Selecting previously unselected package python3-pytest. 104s Preparing to unpack .../196-python3-pytest_9.0.2-2_all.deb ... 104s Unpacking python3-pytest (9.0.2-2) ... 104s Selecting previously unselected package python3-pytest-mock. 104s Preparing to unpack .../197-python3-pytest-mock_3.15.1-1_all.deb ... 104s Unpacking python3-pytest-mock (3.15.1-1) ... 104s Selecting previously unselected package python3-wrapt. 104s Preparing to unpack .../198-python3-wrapt_1.17.3-3_amd64.deb ... 104s Unpacking python3-wrapt (1.17.3-3) ... 104s Selecting previously unselected package python3-yarl. 104s Preparing to unpack .../199-python3-yarl_1.22.0-1_amd64.deb ... 104s Unpacking python3-yarl (1.22.0-1) ... 104s Selecting previously unselected package python3-vcr. 104s Preparing to unpack .../200-python3-vcr_7.0.0-2_all.deb ... 104s Unpacking python3-vcr (7.0.0-2) ... 104s Selecting previously unselected package python3-pytest-recording. 104s Preparing to unpack .../201-python3-pytest-recording_0.13.4-1_all.deb ... 104s Unpacking python3-pytest-recording (0.13.4-1) ... 104s Selecting previously unselected package python3-rasterio. 104s Preparing to unpack .../202-python3-rasterio_1.4.3-2build2_amd64.deb ... 104s Unpacking python3-rasterio (1.4.3-2build2) ... 104s Selecting previously unselected package python3-requests-mock. 104s Preparing to unpack .../203-python3-requests-mock_1.12.1-4_all.deb ... 104s Unpacking python3-requests-mock (1.12.1-4) ... 104s Selecting previously unselected package python3-shapely. 104s Preparing to unpack .../204-python3-shapely_2.1.2-1ubuntu1_amd64.deb ... 104s Unpacking python3-shapely (2.1.2-1ubuntu1) ... 104s Selecting previously unselected package python3-starlette. 104s Preparing to unpack .../205-python3-starlette_0.50.0-1_all.deb ... 104s Unpacking python3-starlette (0.50.0-1) ... 104s Selecting previously unselected package python3-uvloop. 104s Preparing to unpack .../206-python3-uvloop_0.22.1+ds1-2_amd64.deb ... 104s Unpacking python3-uvloop (0.22.1+ds1-2) ... 104s Selecting previously unselected package python3-wsproto. 104s Preparing to unpack .../207-python3-wsproto_1.3.2-1_all.deb ... 104s Unpacking python3-wsproto (1.3.2-1) ... 104s Selecting previously unselected package python3-uvicorn. 104s Preparing to unpack .../208-python3-uvicorn_0.38.0-1_all.deb ... 104s Unpacking python3-uvicorn (0.38.0-1) ... 104s Selecting previously unselected package python3-watchfiles. 104s Preparing to unpack .../209-python3-watchfiles_1.1.1-2_amd64.deb ... 104s Unpacking python3-watchfiles (1.1.1-2) ... 104s Selecting previously unselected package python3-websockets. 104s Preparing to unpack .../210-python3-websockets_15.0.1-1build1_amd64.deb ... 104s Unpacking python3-websockets (15.0.1-1build1) ... 104s Selecting previously unselected package python3-sphinx-autobuild. 104s Preparing to unpack .../211-python3-sphinx-autobuild_2025.08.25-1_all.deb ... 104s Unpacking python3-sphinx-autobuild (2025.08.25-1) ... 104s Selecting previously unselected package python3-sphinx-design. 104s Preparing to unpack .../212-python3-sphinx-design_0.7.0-1_all.deb ... 104s Unpacking python3-sphinx-design (0.7.0-1) ... 104s Selecting previously unselected package libjs-mathjax. 104s Preparing to unpack .../213-libjs-mathjax_2.7.9+dfsg-1build1_all.deb ... 104s Unpacking libjs-mathjax (2.7.9+dfsg-1build1) ... 105s Setting up dh-python (7.20251231) ... 105s Setting up liblcms2-2:amd64 (2.17-1) ... 105s Setting up python3-iniconfig (2.1.0-2) ... 105s Setting up python3-sniffio (1.3.1-1) ... 105s Setting up python3-tornado (6.5.4-0.1) ... 105s Setting up libnorm1t64:amd64 (1.5.9+dfsg-4) ... 105s Setting up libsharpyuv0:amd64 (1.5.0-0.1build1) ... 105s Setting up libgpgmepp6t64:amd64 (1.24.2-3ubuntu2) ... 105s Setting up libaom3:amd64 (3.13.1-2) ... 105s Setting up mysql-common (5.8+1.1.1ubuntu2) ... 105s update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode 105s Setting up python3-pure-eval (0.2.3-1) ... 106s Setting up fonts-mathjax (2.7.9+dfsg-1build1) ... 106s Setting up libsodium23:amd64 (1.0.18-2) ... 106s Setting up liblerc4:amd64 (4.0.0+ds-5ubuntu2) ... 106s Setting up proj-data (9.7.1-1) ... 106s Setting up python-pystac-doc (1.14.3-1) ... 106s Setting up libjs-mathjax (2.7.9+dfsg-1build1) ... 106s Setting up python3-anyio (4.11.0-3) ... 106s Setting up python3-parso (0.8.5-1) ... 106s Setting up libogdi4.1:amd64 (4.1.1+ds-5) ... 106s Setting up python3-colorama (0.4.6-4build1) ... 106s Setting up python3-defusedxml (0.7.1-3build1) ... 106s Setting up libarchive-zip-perl (1.68-1) ... 106s Setting up python3-alabaster (0.7.16-0.1build1) ... 106s Setting up libdebhelper-perl (13.28ubuntu1) ... 106s Setting up libpq5:amd64 (18.1-2) ... 106s Setting up libdeflate0:amd64 (1.23-2) ... 106s Setting up m4 (1.4.20-2) ... 106s Setting up python3-watchfiles (1.1.1-2) ... 106s Setting up libqhull-r8.0:amd64 (2020.2-8) ... 106s Setting up node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 106s Setting up python3-starlette (0.50.0-1) ... 107s Setting up python3-pandocfilters (1.5.1-1) ... 107s Setting up libxerces-c3.2t64:amd64 (3.2.4+debian-1.3build2) ... 107s Setting up libgomp1:amd64 (15.2.0-11ubuntu1) ... 107s Setting up python3-click (8.2.0+0.really.8.1.8-1build1) ... 107s Setting up libmysqlclient24:amd64 (8.4.7-0ubuntu3) ... 107s Setting up python3-wheel (0.46.1-2) ... 107s Setting up libjbig0:amd64 (2.1-6.1ubuntu3) ... 107s Setting up python3-webencodings (0.5.1-5build1) ... 107s Setting up libaec0:amd64 (1.1.4-2) ... 107s Setting up python3-platformdirs (4.5.1-1) ... 107s Setting up python3-psutil (7.1.0-1ubuntu1) ... 108s Setting up gdal-data (3.12.1+dfsg-1) ... 108s Setting up python3-multidict (6.4.3-1build1) ... 108s Setting up libsnappy1v5:amd64 (1.2.2-2) ... 108s Setting up python3-jupyterlab-pygments (0.2.2-3build1) ... 108s Setting up libpgm-5.3-0t64:amd64 (5.3.128~dfsg-2.1build2) ... 108s Setting up python3-decorator (5.2.1-2) ... 108s Setting up autotools-dev (20240727.1) ... 108s Setting up libblas3:amd64 (3.12.1-7ubuntu1) ... 108s 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 108s Setting up libcfitsio10t64:amd64 (4.6.3-1) ... 108s Setting up python3-wcwidth (0.2.14+dfsg1-1build1) ... 108s Setting up python3-pyproject-hooks (1.2.0-1) ... 108s Setting up python3-accessible-pygments (0.0.5-2build1) ... 108s Setting up python3-typeshed (0.0~git20241223.ea91db2-4) ... 108s Setting up python3-snowballstemmer (3.0.1-1) ... 109s Setting up python3-requests-mock (1.12.1-4) ... 109s Setting up libquadmath0:amd64 (15.2.0-11ubuntu1) ... 109s Setting up fonts-dejavu-mono (2.37-8build1) ... 109s Setting up libmpc3:amd64 (1.3.1-2) ... 109s Setting up python3-numpy-dev:amd64 (1:2.3.5+ds-3) ... 109s Setting up python3-wrapt (1.17.3-3) ... 109s Setting up python3-h11 (0.14.0-1.1) ... 109s Setting up autopoint (0.23.2-1) ... 109s Setting up python3-click-plugins (1.1.1-5) ... 109s Setting up fonts-dejavu-core (2.37-8build1) ... 109s Setting up unixodbc-common (2.3.14-1) ... 109s Setting up libjpeg-turbo8:amd64 (2.1.5-4ubuntu2) ... 109s Setting up python3-html5lib (1.2-3) ... 110s Setting up libltdl7:amd64 (2.5.4-9) ... 110s Setting up python3-uvloop (0.22.1+ds1-2) ... 110s Setting up python3-installer (0.7.0+dfsg1-3) ... 110s Setting up libgfortran5:amd64 (15.2.0-11ubuntu1) ... 110s Setting up autoconf (2.72-3.1ubuntu1) ... 110s Setting up python3-pluggy (1.6.0-2) ... 110s Setting up libwebp7:amd64 (1.5.0-0.1build1) ... 110s Setting up libubsan1:amd64 (15.2.0-11ubuntu1) ... 110s Setting up python3-fastjsonschema (2.21.1-1) ... 110s Setting up libgif7:amd64 (5.2.2-1ubuntu3) ... 110s Setting up libodbc2:amd64 (2.3.14-1) ... 110s Setting up libgeos3.14.1:amd64 (3.14.1-2) ... 110s Setting up liburiparser1:amd64 (0.9.8+dfsg-2) ... 110s Setting up libfyba0t64:amd64 (4.1.1-11build2) ... 110s Setting up dwz (0.16-2) ... 110s Setting up libdav1d7:amd64 (1.5.3-1) ... 110s Setting up libminizip1t64:amd64 (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 110s Setting up python3-astroid (4.0.2-1ubuntu1) ... 110s Setting up libhwasan0:amd64 (15.2.0-11ubuntu1) ... 110s Setting up python3-livereload (2.7.1-0.1) ... 111s Setting up python3-propcache (0.3.1-1build1) ... 111s Setting up python3-traitlets (5.14.3+really5.14.3-2) ... 111s Setting up libasan8:amd64 (15.2.0-11ubuntu1) ... 111s Setting up python-tinycss2-common (1.5.1-1) ... 111s Setting up libjson-perl (4.10000-1) ... 111s Setting up libblosc1:amd64 (1.21.5+ds-2) ... 111s Setting up debugedit (1:5.2-3) ... 111s Setting up python3-roman-numerals (4.1.0-1) ... 111s Setting up liblua5.4-0:amd64 (5.4.8-1) ... 111s Setting up libopenjp2-7:amd64 (2.5.4-1) ... 111s Setting up python3.13-minimal (3.13.11-1) ... 112s Setting up libabsl20260107:amd64 (20260107.0-0ubuntu2) ... 112s Setting up sgml-base (1.31+nmu1) ... 112s Setting up pandoc-data (3.1.11.1-3build1) ... 112s Setting up libtsan2:amd64 (15.2.0-11ubuntu1) ... 112s Setting up libisl23:amd64 (0.27-1build1) ... 112s Setting up python3-affine (2.4.0-2) ... 112s Setting up python3-build (1.2.2-5) ... 112s Setting up libde265-0:amd64 (1.0.16-1build1) ... 112s Setting up libkmlbase1t64:amd64 (1.3.0-13) ... 112s Setting up python3-yarl (1.22.0-1) ... 112s Setting up python3-mistune (3.1.4-1) ... 112s Setting up python3-soupsieve (2.8.1-1) ... 112s Setting up libcc1-0:amd64 (15.2.0-11ubuntu1) ... 112s Setting up python3-jupyter-core (5.9.1-1) ... 112s Setting up liblsan0:amd64 (15.2.0-11ubuntu1) ... 112s Setting up libsz2:amd64 (1.1.4-2) ... 112s Setting up libitm1:amd64 (15.2.0-11ubuntu1) ... 112s Setting up python3-imagesize (1.4.1-1build1) ... 113s Setting up gdal-plugins:amd64 (3.12.1+dfsg-1) ... 113s Setting up python3-websockets (15.0.1-1build1) ... 113s Setting up python3-pystac (1.14.3-1) ... 113s Setting up libjpeg8:amd64 (8c-2ubuntu11) ... 113s Setting up automake (1:1.18.1-3build1) ... 113s update-alternatives: using /usr/bin/automake-1.18 to provide /usr/bin/automake (automake) in auto mode 113s Setting up python3-prompt-toolkit (3.0.52-2) ... 113s Setting up libfile-stripnondeterminism-perl (1.15.0-1build1) ... 113s Setting up libodbcinst2:amd64 (2.3.14-1) ... 113s Setting up liblapack3:amd64 (3.12.1-7ubuntu1) ... 113s 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 113s Setting up gettext (0.23.2-1) ... 113s Setting up libarpack2t64:amd64 (3.9.1-6) ... 113s Setting up python3-tinycss2 (1.5.1-1) ... 114s Setting up libgcc-15-dev:amd64 (15.2.0-11ubuntu1) ... 114s Setting up libzmq5:amd64 (4.3.5-1build3) ... 114s Setting up python3-wsproto (1.3.2-1) ... 114s Setting up python3-jedi (0.19.1+ds1-1build1) ... 114s Setting up python3.13 (3.13.11-1) ... 115s Setting up python3-asttokens (3.0.1-1) ... 115s Setting up pybuild-plugin-pyproject (7.20251231) ... 115s Setting up fontconfig-config (2.15.0-2.4ubuntu1) ... 115s Setting up python3-pytest (9.0.2-2) ... 115s Setting up libgeos-c1t64:amd64 (3.14.1-2) ... 115s Setting up python3-cligj (0.7.2-3) ... 115s Setting up python3-all (3.14.2-1) ... 115s Setting up python3-nbformat (5.10.4-1) ... 116s Setting up cpp-15-x86-64-linux-gnu (15.2.0-11ubuntu1) ... 116s Setting up python3-bs4 (4.14.3-2build1) ... 116s Setting up intltool-debian (0.35.0+20060710.6build1) ... 116s Setting up python3-bleach (6.3.0-1) ... 116s Setting up python3-matplotlib-inline (0.2.1-1) ... 116s Setting up gcc-15-x86-64-linux-gnu (15.2.0-11ubuntu1) ... 116s Setting up libkmldom1t64:amd64 (1.3.0-13) ... 116s Setting up libstdc++-15-dev:amd64 (15.2.0-11ubuntu1) ... 116s Setting up pandoc (3.1.11.1+ds-4) ... 116s Setting up python3-executing (2.2.1-0.1) ... 116s Setting up python3-zmq (27.1.0-1) ... 116s Setting up sphinx-common (8.2.3-12) ... 116s Setting up python3-vcr (7.0.0-2) ... 117s Setting up python3-numpy (1:2.3.5+ds-3) ... 119s Setting up libhdf4-0-alt:amd64 (4.3.0-1) ... 119s Setting up dh-strip-nondeterminism (1.15.0-1build1) ... 119s Setting up libgav1-2:amd64 (0.20.0-2build1) ... 119s Setting up librttopo1:amd64 (1.1.0-4) ... 119s Setting up libhdf5-310:amd64 (1.14.6+repack-2) ... 119s Setting up libfreexl1:amd64 (2.0.0-1build3) ... 119s Setting up python3-pytest-mock (3.15.1-1) ... 119s Setting up cpp-15 (15.2.0-11ubuntu1) ... 119s Setting up libtiff6:amd64 (4.7.0-3ubuntu3) ... 119s Setting up xml-core (0.19build1) ... 119s Setting up python3-jupyter-client (8.7.0-1) ... 119s Setting up libarmadillo14 (1:14.2.3+dfsg-1) ... 119s Setting up libfontconfig1:amd64 (2.15.0-2.4ubuntu1) ... 119s Setting up libyuv0:amd64 (0.0.1922.20260106-1) ... 119s Setting up python3-stack-data (0.6.3-3) ... 119s Setting up cpp-x86-64-linux-gnu (4:15.2.0-4ubuntu1) ... 119s Setting up python3-pytest-recording (0.13.4-1) ... 119s Setting up libhdf5-hl-310:amd64 (1.14.6+repack-2) ... 119s Setting up g++-15-x86-64-linux-gnu (15.2.0-11ubuntu1) ... 119s Setting up libavif16:amd64 (1.3.0-1ubuntu3) ... 119s Setting up python3-shapely (2.1.2-1ubuntu1) ... 120s Setting up python3-uvicorn (0.38.0-1) ... 120s Setting up libpoppler147:amd64 (25.03.0-11.1) ... 120s Setting up gcc-x86-64-linux-gnu (4:15.2.0-4ubuntu1) ... 120s Setting up libproj25:amd64 (9.7.1-1) ... 120s Setting up po-debconf (1.0.22) ... 120s Setting up libnetcdf22:amd64 (1:4.9.3-1build1) ... 120s Setting up libkmlengine1t64:amd64 (1.3.0-13) ... 120s Setting up libgeotiff5:amd64 (1.7.4-1) ... 120s Setting up python3-nbclient (0.10.4-1) ... 120s Setting up gcc-15 (15.2.0-11ubuntu1) ... 120s Setting up python3-ipython (8.35.0-2) ... 120s /usr/lib/python3/dist-packages/IPython/core/interactiveshell.py:3141: SyntaxWarning: 'return' in a 'finally' block 120s return result 121s Setting up python3-nbconvert (7.16.6-1) ... 121s Setting up cpp (4:15.2.0-4ubuntu1) ... 121s Setting up g++-x86-64-linux-gnu (4:15.2.0-4ubuntu1) ... 121s Setting up g++-15 (15.2.0-11ubuntu1) ... 121s Setting up libspatialite8t64:amd64 (5.1.0-3ubuntu1) ... 121s Setting up libtool (2.5.4-9) ... 121s Setting up gcc (4:15.2.0-4ubuntu1) ... 121s Setting up dh-autoreconf (21) ... 121s Setting up g++ (4:15.2.0-4ubuntu1) ... 121s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 121s Setting up build-essential (12.12ubuntu2) ... 121s Setting up debhelper (13.28ubuntu1) ... 121s Setting up pybuild-plugin-autopkgtest (7.20251231) ... 121s Setting up libheif-plugin-aomdec:amd64 (1.21.2-1) ... 121s Setting up libheif1:amd64 (1.21.2-1) ... 121s Setting up libgdal36:amd64 (3.10.3+dfsg-1build3) ... 121s Setting up libheif-plugin-libde265:amd64 (1.21.2-1) ... 121s Setting up python3-rasterio (1.4.3-2build2) ... 121s Processing triggers for install-info (7.2-5) ... 121s Processing triggers for libc-bin (2.42-2ubuntu4) ... 121s Processing triggers for systemd (259-1ubuntu2) ... 121s Processing triggers for man-db (2.13.1-1) ... 122s Processing triggers for sgml-base (1.31+nmu1) ... 122s Setting up docutils-common (0.22.4+dfsg-1) ... 122s Processing triggers for sgml-base (1.31+nmu1) ... 122s Setting up python3-docutils (0.22.4+dfsg-1) ... 123s Setting up python3-sphinx (8.2.3-12) ... 124s Setting up python3-sphinx-autobuild (2025.08.25-1) ... 124s Setting up python3-sphinx-design (0.7.0-1) ... 124s Setting up python3-nbsphinx (0.9.5+ds-1) ... 124s Setting up python3-pydata-sphinx-theme (0.16.1+dfsg-5) ... 125s autopkgtest [13:17:43]: test pybuild-autopkgtest: pybuild-autopkgtest 125s autopkgtest [13:17:43]: test pybuild-autopkgtest: [----------------------- 125s pybuild-autopkgtest 125s I: pybuild base:384: cd /tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build; python3.13 -m pytest tests 127s ============================= test session starts ============================== 127s platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0 127s rootdir: /tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build 127s configfile: pyproject.toml 127s plugins: typeguard-4.4.4, recording-0.13.4, anyio-4.11.0, requests_mock-1.12.1, mock-3.15.1 127s collected 1557 items 127s 127s tests/extensions/test_classification.py .................... [ 1%] 127s tests/extensions/test_custom.py ....... [ 1%] 128s tests/extensions/test_datacube.py ................................. [ 3%] 128s tests/extensions/test_eo.py .......................................... [ 6%] 128s tests/extensions/test_ext.py ........................................... [ 9%] 128s ....... [ 9%] 128s tests/extensions/test_file.py ................................. [ 11%] 128s tests/extensions/test_grid.py ............ [ 12%] 128s tests/extensions/test_mgrs.py ................... [ 13%] 128s tests/extensions/test_mlm.py ........................................... [ 16%] 128s ... [ 16%] 128s tests/extensions/test_pointcloud.py ...................... [ 18%] 129s tests/extensions/test_projection.py ................................... [ 20%] 129s tests/extensions/test_raster.py ......... [ 21%] 129s tests/extensions/test_render.py .................. [ 22%] 129s tests/extensions/test_sar.py ...................... [ 23%] 129s tests/extensions/test_sat.py .......................... [ 25%] 129s tests/extensions/test_scientific.py .................................... [ 27%] 129s . [ 27%] 129s tests/extensions/test_storage.py ................... [ 28%] 129s tests/extensions/test_table.py ......... [ 29%] 129s tests/extensions/test_timestamps.py ................. [ 30%] 129s tests/extensions/test_version.py .............................. [ 32%] 129s tests/extensions/test_view.py ....................... [ 33%] 129s tests/extensions/test_xarray_assets.py ..................... [ 35%] 130s tests/html/test_html.py .......... [ 35%] 130s tests/posix_paths/test_posix_paths.py ...ss.ss [ 36%] 130s tests/serialization/test_identify.py ................................... [ 38%] 130s ........................................................................ [ 43%] 130s .......................... [ 45%] 130s tests/serialization/test_migrate.py .................................... [ 47%] 130s ........................................................................ [ 51%] 130s ......................... [ 53%] 130s tests/test_asset.py ...............ssss [ 54%] 130s tests/test_cache.py .... [ 55%] 130s tests/test_catalog.py .................................................. [ 58%] 132s ........................................................................ [ 62%] 132s ................... [ 64%] 132s tests/test_collection.py ............................................... [ 67%] 132s ...... [ 67%] 132s tests/test_common_metadata.py ...................... [ 68%] 133s tests/test_item.py ..................................................... [ 72%] 133s [ 72%] 133s tests/test_item_assets.py ............. [ 73%] 133s tests/test_item_collection.py .................. [ 74%] 133s tests/test_layout.py ............................................. [ 77%] 133s tests/test_link.py ........................................... [ 79%] 133s tests/test_pystac_client.py s. [ 80%] 133s tests/test_stac_io.py ................ [ 81%] 133s tests/test_summaries.py ........... [ 81%] 133s tests/test_utils.py ................................ssssssss..s......... [ 85%] 134s ............................................................... [ 89%] 134s tests/test_version.py .. [ 89%] 141s tests/test_writing.py ..................... [ 90%] 141s tests/validation/test_schema_uri_map.py . [ 90%] 145s tests/validation/test_validate.py ...................................... [ 93%] 146s ........................................................................ [ 97%] 151s .................................. [100%] 151s 151s ====================== 1539 passed, 18 skipped in 25.19s ======================= 151s I: pybuild base:384: cd /tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build; python3.14 -m pytest tests 153s ============================= test session starts ============================== 153s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 153s rootdir: /tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build 153s configfile: pyproject.toml 153s plugins: typeguard-4.4.4, recording-0.13.4, anyio-4.11.0, requests_mock-1.12.1, mock-3.15.1 153s collected 1557 items 153s 153s tests/extensions/test_classification.py ......EE.....E...... [ 1%] 153s tests/extensions/test_custom.py ....... [ 1%] 154s tests/extensions/test_datacube.py .......................E..EE..... [ 3%] 154s tests/extensions/test_eo.py .....EE.EE...............EE............... [ 6%] 154s tests/extensions/test_ext.py ........................................... [ 9%] 154s ....... [ 9%] 155s tests/extensions/test_file.py .....EEE.....EEEEE.EEEEE.......EE [ 11%] 155s tests/extensions/test_grid.py ..E.E....... [ 12%] 155s tests/extensions/test_mgrs.py ........E...EEE.... [ 13%] 155s tests/extensions/test_mlm.py .........................E...E............. [ 16%] 155s ... [ 16%] 156s tests/extensions/test_pointcloud.py ..EEEEEEE............. [ 18%] 156s tests/extensions/test_projection.py ..EEE.EE.EEEEE.........E........... [ 20%] 156s tests/extensions/test_raster.py .EE...... [ 21%] 157s tests/extensions/test_render.py ................EE [ 22%] 157s tests/extensions/test_sar.py .EE................... [ 23%] 157s tests/extensions/test_sat.py ...EEEEEEEEE..EE.......... [ 25%] 158s tests/extensions/test_scientific.py ...EEEEEEEEEE...EEEEEEEEEE.......... [ 27%] 158s . [ 27%] 159s tests/extensions/test_storage.py ..E............EEEE [ 28%] 159s tests/extensions/test_table.py E........ [ 29%] 159s tests/extensions/test_timestamps.py ..EEEE........... [ 30%] 160s tests/extensions/test_version.py ...EEEEEEEE......EE.EE....EE.. [ 32%] 160s tests/extensions/test_view.py ..EEEEEE............... [ 33%] 160s tests/extensions/test_xarray_assets.py ...........EE....EE.. [ 35%] 160s tests/html/test_html.py .......... [ 35%] 160s tests/posix_paths/test_posix_paths.py ...ss.ss [ 36%] 161s tests/serialization/test_identify.py ................................... [ 38%] 161s ........................................................................ [ 43%] 161s .......................... [ 45%] 161s tests/serialization/test_migrate.py .................................... [ 47%] 161s ........................................................................ [ 51%] 161s ......................... [ 53%] 161s tests/test_asset.py ...............ssss [ 54%] 161s tests/test_cache.py .... [ 55%] 161s tests/test_catalog.py ........E......................................... [ 58%] 162s ...........................EEEEEEEE.................................EE.. [ 62%] 162s ................... [ 64%] 162s tests/test_collection.py ............................................... [ 67%] 162s ...... [ 67%] 162s tests/test_common_metadata.py ...................... [ 68%] 163s tests/test_item.py ..........E.E..E....E......................E......... [ 72%] 163s [ 72%] 163s tests/test_item_assets.py ............. [ 73%] 163s tests/test_item_collection.py .................. [ 74%] 163s tests/test_layout.py ............................................. [ 77%] 163s tests/test_link.py ........................................... [ 79%] 163s tests/test_pystac_client.py s. [ 80%] 163s tests/test_stac_io.py ...........EE.EE [ 81%] 163s tests/test_summaries.py ........... [ 81%] 163s tests/test_utils.py ................................ssssssss..s......... [ 85%] 164s ............................................................... [ 89%] 164s tests/test_version.py .. [ 89%] 165s tests/test_writing.py EEEEEEEEEEEEEEEEEEEEE [ 90%] 165s tests/validation/test_schema_uri_map.py . [ 90%] 168s tests/validation/test_validate.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 93%] 172s EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 97%] 174s EEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.... [100%] 174s 174s ==================================== ERRORS ==================================== 174s ____________________ ERROR at setup of test_apply_bitfields ____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_apply_classes _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________ ERROR at setup of test_validate_classification ________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________________ ERROR at setup of test_validate ________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_set_variables _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________________ ERROR at setup of test_set_dimensions _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________________ ERROR at setup of test_validate_eo ______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________________________ ERROR at setup of test_bands _________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________________ ERROR at setup of test_asset_bands ______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________________ ERROR at setup of test_cloud_cover ______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________ ERROR at setup of test_set_field[cloud_cover-7.8] _______________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________ ERROR at setup of test_set_field[snow_cover-99] ________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_validate_item _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __________________ ERROR at setup of test_validate_collection __________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ___________________ ERROR at setup of test_validate_catalog ____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________ ERROR at setup of test_set_field_on_asset[thumbnail-size-1] __________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ___ ERROR at setup of test_set_field_on_asset[measurement-header_size-8192] ____ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of test_set_field_on_asset[thumbnail-checksum-90e40210163700a8a6501eccd00b6d3b44ddaed0] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of test_set_field_on_asset[thumbnail-byte_order-little-endian] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of test_set_field_on_asset[calibrations-local_path-different-file.xml] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________ ERROR at setup of test_set_field_on_link[about-size-129302] __________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of test_set_field_on_link[about-header_size-4092] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of test_set_field_on_link[about-checksum-90e40210163700a8a6501eccd00b6d3b44ddaedb] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____ ERROR at setup of test_set_field_on_link[about-byte_order-big-endian] _____ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of test_set_field_on_link[about-local_path-a/path] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __________________ ERROR at setup of test_migrate_from_v2_0_0 __________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __________________ ERROR at setup of test_migrate_from_v1_0_0 __________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________________ ERROR at setup of test_attributes _______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_grid' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________________ ERROR at setup of test_modify _________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_grid' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________________ ERROR at setup of test_validate ________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________ ERROR at setup of test_set_field[latitude_band-C] _______________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________ ERROR at setup of test_set_field[grid_square-ZA] _______________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________ ERROR at setup of test_set_field[utm_zone-59] _________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________________________ ERROR at setup of test_apply _________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_mlm' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_validate_mlm ______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_mlm' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __________________ ERROR at setup of test_validate_pointcloud __________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________________________ ERROR at setup of test_count _________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________________________ ERROR at setup of test_type __________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________________ ERROR at setup of test_encoding ________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________________ ERROR at setup of test_schemas ________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________________ ERROR at setup of test_statistics _______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________________ ERROR at setup of test_density ________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_partial_apply _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_validate_proj _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________________________ ERROR at setup of test_epsg __________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________________________ ERROR at setup of test_wkt2 __________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________________ ERROR at setup of test_projjson ________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________________ ERROR at setup of test_geometry ________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________________________ ERROR at setup of test_bbox __________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________________ ERROR at setup of test_centroid ________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________________________ ERROR at setup of test_shape _________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________________ ERROR at setup of test_transform _______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_get_set_code ______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________________ ERROR at setup of test_validate_raster ____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_raster' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________________ ERROR at setup of test_asset_bands ______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_raster' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_item_validate _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_render' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __________________ ERROR at setup of test_collection_validate __________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_render' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________________ ERROR at setup of test_required ________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_sar' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __________________________ ERROR at setup of test_all __________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_sar' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_no_args_fails _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________________ ERROR at setup of test_orbit_state ______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________________ ERROR at setup of test_relative_orbit _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________________ ERROR at setup of test_absolute_orbit _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_anx_datetime ______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ___________ ERROR at setup of test_platform_international_designator ___________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________ ERROR at setup of test_relative_orbit_no_negative _______________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________________________ ERROR at setup of test_both __________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________________ ERROR at setup of test_modify _________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ___________________ ERROR at setup of test_clear_orbit_state ___________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________________ ERROR at setup of test_clear_relative_orbit __________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __________________________ ERROR at setup of test_doi __________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________________ ERROR at setup of test_citation ________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ___________________ ERROR at setup of test_publications_one ____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_publications ______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________ ERROR at setup of test_remove_publication_one _________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________ ERROR at setup of test_remove_all_publications_one ______________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________ ERROR at setup of test_remove_publication_forward _______________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________ ERROR at setup of test_remove_publication_reverse _______________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ___________ ERROR at setup of test_remove_all_publications_with_some ___________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ___________ ERROR at setup of test_remove_all_publications_with_none ___________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________________ ERROR at setup of test_collection_doi _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __________________ ERROR at setup of test_collection_citation __________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________ ERROR at setup of test_collection_publications_one ______________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________ ERROR at setup of test_collection_publications ________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ___________ ERROR at setup of test_collection_remove_publication_one ___________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________ ERROR at setup of test_collection_remove_all_publications_one _________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________ ERROR at setup of test_collection_remove_publication_forward _________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________ ERROR at setup of test_collection_remove_publication_reverse _________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____ ERROR at setup of test_collection_remove_all_publications_with_some ______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____ ERROR at setup of test_collection_remove_all_publications_with_none ______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ___________________ ERROR at setup of test_validate_storage ____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________________ ERROR at setup of test_asset_platform _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_asset_region ______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________________ ERROR at setup of test_asset_requester_pays __________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________________ ERROR at setup of test_asset_tier _______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________________ ERROR at setup of test_validate ________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_table' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __________________ ERROR at setup of test_validate_timestamps __________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________________ ERROR at setup of test_expires ________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________________ ERROR at setup of test_published _______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________________ ERROR at setup of test_unpublished ______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________________ ERROR at setup of test_add_version ______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________________ ERROR at setup of test_version_in_properties _________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________ ERROR at setup of test_add_not_deprecated_version _______________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________ ERROR at setup of test_add_deprecated_version _________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________________ ERROR at setup of test_latest _________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________________ ERROR at setup of test_predecessor ______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________________ ERROR at setup of test_successor _______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________________ ERROR at setup of test_all_links _______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________ ERROR at setup of test_collection_add_version _________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________ ERROR at setup of test_collection_validate_all ________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __________________ ERROR at setup of test_catalog_add_version __________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________________ ERROR at setup of test_catalog_validate_all __________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ___________________ ERROR at setup of test_optional_version ____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________________ ERROR at setup of test_assets _________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_validate_view _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________________ ERROR at setup of test_off_nadir _______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________________ ERROR at setup of test_incidence_angle ____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________________ ERROR at setup of test_azimuth ________________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______________________ ERROR at setup of test_sun_azimuth ______________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_sun_elevation _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_item_validate _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __________________ ERROR at setup of test_collection_validate __________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ___________ ERROR at setup of test_set_field[storage_options-value0] ___________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________ ERROR at setup of test_set_field[open_kwargs-value1] _____________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________ ERROR at setup of TestCatalog.test_read_remote ________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_catalog' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________ ERROR at setup of TestCatalog.test_validate_all[cat0] _____________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_catalog' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________ ERROR at setup of TestCatalog.test_validate_all[cat1] _____________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_catalog' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________ ERROR at setup of TestCatalog.test_validate_all[cat2] _____________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_catalog' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________ ERROR at setup of TestCatalog.test_validate_all[cat3] _____________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_catalog' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________ ERROR at setup of TestCatalog.test_validate_all[cat4] _____________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_catalog' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________ ERROR at setup of TestCatalog.test_validate_all[cat5] _____________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_catalog' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________ ERROR at setup of TestCatalog.test_validate_all[cat6] _____________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_catalog' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ___________ ERROR at setup of TestCatalog.test_validate_all_invalid ____________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_catalog' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________ ERROR at setup of test_validate_all_with_max_n ________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_catalog' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________ ERROR at setup of test_validate_all_with_recusive_off _____________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_catalog' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_null_datetime _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_item' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________ ERROR at setup of test_null_datetime_constructor _______________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_item' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_null_geometry _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_item' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________________ ERROR at setup of test_relative_extension_path ________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_item' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________ ERROR at setup of test_non_hierarchical_relative_link _____________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_item' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________________ ERROR at setup of test_retry_stac_io _____________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ___________________ ERROR at setup of test_retry_stac_io_404 ___________________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ____________ ERROR at setup of test_urls_with_non_ascii_characters _____________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____________ ERROR at setup of test_proj_json_schema_is_readable ______________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog0] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog1] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog2] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog3] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog4] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog5] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog6] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog0] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog1] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog2] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog3] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog4] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog5] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog6] _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog0] ___ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog1] ___ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog2] ___ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog3] ___ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog4] ___ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog5] ___ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog6] ___ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/cassettes/test_writing' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _________ ERROR at setup of TestValidate.test_validate_current_version _________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example0] ________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example1] ________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example2] ________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example3] ________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example4] ________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example5] ________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example6] ________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example7] ________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example8] ________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example9] ________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example10] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example11] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example12] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example13] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example14] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example15] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example16] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example17] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example18] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example19] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example20] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example21] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example22] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example23] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example24] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example25] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example26] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example27] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example28] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example29] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example30] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example31] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example32] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example33] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example34] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example35] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example36] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example37] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example38] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example39] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example40] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example41] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example42] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example43] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example44] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example45] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example46] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example47] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example48] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example49] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example50] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example51] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example52] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example53] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example54] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example55] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example56] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example57] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example58] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example59] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example60] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example61] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example62] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example63] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example64] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example65] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example66] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example67] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example68] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example69] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example70] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example71] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example72] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example73] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example74] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example75] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example76] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example77] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example78] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example79] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example80] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example81] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example82] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example83] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example84] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example85] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example86] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example87] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example88] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example89] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example90] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example91] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example92] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example93] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example94] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example95] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example96] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example97] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example98] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_examples[example99] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example100] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example101] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example102] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example103] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example104] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example105] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example106] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example107] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example108] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example109] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example110] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example111] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example112] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example113] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example114] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example115] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example116] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example117] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example118] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example119] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example120] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example121] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example122] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example123] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_examples[example124] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_error_contains_href _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _____ ERROR at setup of TestValidate.test_validate_all_deprecated_dict_arg _____ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestValidate.test_validate_all_deprecated_dict_arg_missing_href _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______ ERROR at setup of TestValidate.test_validate_all_unexpected_href _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _______________ ERROR at setup of TestValidate.test_validate_all _______________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case0] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case1] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case2] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case3] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case4] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case5] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case6] _______ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s _ ERROR at setup of TestValidate.test_validates_geojson_with_tuple_coordinates _ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s ________ ERROR at setup of TestValidate.test_validate_custom_validator _________ 174s 174s request = > 174s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 174s vcr_cassette_dir = '/tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 174s record_mode = 'none', disable_recording = False 174s pytestconfig = <_pytest.config.Config object at 0x78f57babc6e0> 174s 174s @pytest.fixture(autouse=True) # type: ignore 174s def vcr( 174s request: SubRequest, 174s vcr_markers: List[Mark], 174s vcr_cassette_dir: str, 174s record_mode: str, 174s disable_recording: bool, 174s pytestconfig: Config, 174s ) -> Iterator[Optional["Cassette"]]: 174s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 174s if disable_recording: 174s yield None 174s elif vcr_markers: 174s > from ._vcr import use_cassette 174s 174s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 174s from vcr import VCR 174s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 174s from .config import VCR 174s /usr/lib/python3/dist-packages/vcr/config.py:10: in 174s from .cassette import Cassette 174s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 174s from .patch import CassettePatcherBuilder 174s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 174s import httplib2 174s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 174s from . import auth 174s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 174s import pyparsing as pp 174s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 174s 174s # module pyparsing.py 174s # 174s # Copyright (c) 2003-2022 Paul T. McGuire 174s # 174s # Permission is hereby granted, free of charge, to any person obtaining 174s # a copy of this software and associated documentation files (the 174s # "Software"), to deal in the Software without restriction, including 174s # without limitation the rights to use, copy, modify, merge, publish, 174s # distribute, sublicense, and/or sell copies of the Software, and to 174s # permit persons to whom the Software is furnished to do so, subject to 174s # the following conditions: 174s # 174s # The above copyright notice and this permission notice shall be 174s # included in all copies or substantial portions of the Software. 174s # 174s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 174s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 174s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 174s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 174s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 174s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174s # 174s 174s __doc__ = """ 174s pyparsing module - Classes and methods to define and execute parsing grammars 174s ============================================================================= 174s 174s The pyparsing module is an alternative approach to creating and 174s executing simple grammars, vs. the traditional lex/yacc approach, or the 174s use of regular expressions. With pyparsing, you don't need to learn 174s a new syntax for defining grammars or matching expressions - the parsing 174s module provides a library of classes that you use to construct the 174s grammar directly in Python. 174s 174s Here is a program to parse "Hello, World!" (or any greeting of the form 174s ``", !"``), built up using :class:`Word`, 174s :class:`Literal`, and :class:`And` elements 174s (the :meth:`'+'` operators create :class:`And` expressions, 174s and the strings are auto-converted to :class:`Literal` expressions):: 174s 174s from pyparsing import Word, alphas 174s 174s # define grammar of a greeting 174s greet = Word(alphas) + "," + Word(alphas) + "!" 174s 174s hello = "Hello, World!" 174s print(hello, "->", greet.parse_string(hello)) 174s 174s The program outputs the following:: 174s 174s Hello, World! -> ['Hello', ',', 'World', '!'] 174s 174s The Python representation of the grammar is quite readable, owing to the 174s self-explanatory class names, and the use of :class:`'+'`, 174s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 174s 174s The :class:`ParseResults` object returned from 174s :class:`ParserElement.parse_string` can be 174s accessed as a nested list, a dictionary, or an object with named 174s attributes. 174s 174s The pyparsing module handles some of the problems that are typically 174s vexing when writing text parsers: 174s 174s - extra or missing whitespace (the above program will also handle 174s "Hello,World!", "Hello , World !", etc.) 174s - quoted strings 174s - embedded comments 174s 174s 174s Getting Started - 174s ----------------- 174s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 174s see the base classes that most other pyparsing 174s classes inherit from. Use the docstrings for examples of how to: 174s 174s - construct literal match expressions from :class:`Literal` and 174s :class:`CaselessLiteral` classes 174s - construct character word-group expressions using the :class:`Word` 174s class 174s - see how to create repetitive expressions using :class:`ZeroOrMore` 174s and :class:`OneOrMore` classes 174s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 174s and :class:`'&'` operators to combine simple expressions into 174s more complex ones 174s - associate names with your parsed results using 174s :class:`ParserElement.set_results_name` 174s - access the parsed data, which is returned as a :class:`ParseResults` 174s object 174s - find some helpful expression short-cuts like :class:`DelimitedList` 174s and :class:`one_of` 174s - find more useful common expressions in the :class:`pyparsing_common` 174s namespace class 174s """ 174s from typing import NamedTuple 174s 174s 174s class version_info(NamedTuple): 174s major: int 174s minor: int 174s micro: int 174s releaselevel: str 174s serial: int 174s 174s @property 174s def __version__(self): 174s return ( 174s f"{self.major}.{self.minor}.{self.micro}" 174s + ( 174s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 174s "", 174s )[self.releaselevel == "final"] 174s ) 174s 174s def __str__(self): 174s return f"{__name__} {self.__version__} / {__version_time__}" 174s 174s def __repr__(self): 174s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 174s 174s 174s __version_info__ = version_info(3, 1, 3, "final", 1) 174s __version_time__ = "24 Aug 2024 23:47 UTC" 174s __version__ = __version_info__.__version__ 174s __versionTime__ = __version_time__ 174s __author__ = "Paul McGuire " 174s 174s from .util import * 174s from .exceptions import * 174s from .actions import * 174s > from .core import __diag__, __compat__ 174s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 174s E return f"{type(self).__name__}: {retString}" 174s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 174s E SyntaxError: 'return' in a 'finally' block 174s 174s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 174s =========================== short test summary info ============================ 174s ERROR tests/extensions/test_classification.py::test_apply_bitfields - File ... 174s ERROR tests/extensions/test_classification.py::test_apply_classes - File "/... 174s ERROR tests/extensions/test_classification.py::test_validate_classification 174s ERROR tests/extensions/test_datacube.py::test_validate - File "/usr/lib/pyt... 174s ERROR tests/extensions/test_datacube.py::test_set_variables - File "/usr/li... 174s ERROR tests/extensions/test_datacube.py::test_set_dimensions - File "/usr/l... 174s ERROR tests/extensions/test_eo.py::test_validate_eo - File "/usr/lib/python... 174s ERROR tests/extensions/test_eo.py::test_bands - File "/usr/lib/python3/dist... 174s ERROR tests/extensions/test_eo.py::test_asset_bands - File "/usr/lib/python... 174s ERROR tests/extensions/test_eo.py::test_cloud_cover - File "/usr/lib/python... 174s ERROR tests/extensions/test_eo.py::test_set_field[cloud_cover-7.8] - File "... 174s ERROR tests/extensions/test_eo.py::test_set_field[snow_cover-99] - File "/u... 174s ERROR tests/extensions/test_file.py::test_validate_item - File "/usr/lib/py... 174s ERROR tests/extensions/test_file.py::test_validate_collection - File "/usr/... 174s ERROR tests/extensions/test_file.py::test_validate_catalog - File "/usr/lib... 174s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-size-1] 174s ERROR tests/extensions/test_file.py::test_set_field_on_asset[measurement-header_size-8192] 174s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-checksum-90e40210163700a8a6501eccd00b6d3b44ddaed0] 174s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-byte_order-little-endian] 174s ERROR tests/extensions/test_file.py::test_set_field_on_asset[calibrations-local_path-different-file.xml] 174s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-size-129302] 174s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-header_size-4092] 174s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-checksum-90e40210163700a8a6501eccd00b6d3b44ddaedb] 174s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-byte_order-big-endian] 174s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-local_path-a/path] 174s ERROR tests/extensions/test_file.py::test_migrate_from_v2_0_0 - File "/usr/... 174s ERROR tests/extensions/test_file.py::test_migrate_from_v1_0_0 - File "/usr/... 174s ERROR tests/extensions/test_grid.py::test_attributes - File "/usr/lib/pytho... 174s ERROR tests/extensions/test_grid.py::test_modify - File "/usr/lib/python3/d... 174s ERROR tests/extensions/test_mgrs.py::test_validate - File "/usr/lib/python3... 174s ERROR tests/extensions/test_mgrs.py::test_set_field[latitude_band-C] - File... 174s ERROR tests/extensions/test_mgrs.py::test_set_field[grid_square-ZA] - File ... 174s ERROR tests/extensions/test_mgrs.py::test_set_field[utm_zone-59] - File "/u... 174s ERROR tests/extensions/test_mlm.py::test_apply - File "/usr/lib/python3/dis... 174s ERROR tests/extensions/test_mlm.py::test_validate_mlm - File "/usr/lib/pyth... 174s ERROR tests/extensions/test_pointcloud.py::test_validate_pointcloud - File ... 174s ERROR tests/extensions/test_pointcloud.py::test_count - File "/usr/lib/pyth... 174s ERROR tests/extensions/test_pointcloud.py::test_type - File "/usr/lib/pytho... 174s ERROR tests/extensions/test_pointcloud.py::test_encoding - File "/usr/lib/p... 174s ERROR tests/extensions/test_pointcloud.py::test_schemas - File "/usr/lib/py... 174s ERROR tests/extensions/test_pointcloud.py::test_statistics - File "/usr/lib... 174s ERROR tests/extensions/test_pointcloud.py::test_density - File "/usr/lib/py... 174s ERROR tests/extensions/test_projection.py::test_partial_apply - File "/usr/... 174s ERROR tests/extensions/test_projection.py::test_validate_proj - File "/usr/... 174s ERROR tests/extensions/test_projection.py::test_epsg - File "/usr/lib/pytho... 174s ERROR tests/extensions/test_projection.py::test_wkt2 - File "/usr/lib/pytho... 174s ERROR tests/extensions/test_projection.py::test_projjson - File "/usr/lib/p... 174s ERROR tests/extensions/test_projection.py::test_geometry - File "/usr/lib/p... 174s ERROR tests/extensions/test_projection.py::test_bbox - File "/usr/lib/pytho... 174s ERROR tests/extensions/test_projection.py::test_centroid - File "/usr/lib/p... 174s ERROR tests/extensions/test_projection.py::test_shape - File "/usr/lib/pyth... 174s ERROR tests/extensions/test_projection.py::test_transform - File "/usr/lib/... 174s ERROR tests/extensions/test_projection.py::test_get_set_code - File "/usr/l... 174s ERROR tests/extensions/test_raster.py::test_validate_raster - File "/usr/li... 174s ERROR tests/extensions/test_raster.py::test_asset_bands - File "/usr/lib/py... 174s ERROR tests/extensions/test_render.py::test_item_validate - File "/usr/lib/... 174s ERROR tests/extensions/test_render.py::test_collection_validate - File "/us... 174s ERROR tests/extensions/test_sar.py::test_required - File "/usr/lib/python3/... 174s ERROR tests/extensions/test_sar.py::test_all - File "/usr/lib/python3/dist-... 174s ERROR tests/extensions/test_sat.py::test_no_args_fails - File "/usr/lib/pyt... 174s ERROR tests/extensions/test_sat.py::test_orbit_state - File "/usr/lib/pytho... 174s ERROR tests/extensions/test_sat.py::test_relative_orbit - File "/usr/lib/py... 174s ERROR tests/extensions/test_sat.py::test_absolute_orbit - File "/usr/lib/py... 174s ERROR tests/extensions/test_sat.py::test_anx_datetime - File "/usr/lib/pyth... 174s ERROR tests/extensions/test_sat.py::test_platform_international_designator - ... 174s ERROR tests/extensions/test_sat.py::test_relative_orbit_no_negative - File ... 174s ERROR tests/extensions/test_sat.py::test_both - File "/usr/lib/python3/dist... 174s ERROR tests/extensions/test_sat.py::test_modify - File "/usr/lib/python3/di... 174s ERROR tests/extensions/test_sat.py::test_clear_orbit_state - File "/usr/lib... 174s ERROR tests/extensions/test_sat.py::test_clear_relative_orbit - File "/usr/... 174s ERROR tests/extensions/test_scientific.py::test_doi - File "/usr/lib/python... 174s ERROR tests/extensions/test_scientific.py::test_citation - File "/usr/lib/p... 174s ERROR tests/extensions/test_scientific.py::test_publications_one - File "/u... 174s ERROR tests/extensions/test_scientific.py::test_publications - File "/usr/l... 174s ERROR tests/extensions/test_scientific.py::test_remove_publication_one - Fi... 174s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_one 174s ERROR tests/extensions/test_scientific.py::test_remove_publication_forward - ... 174s ERROR tests/extensions/test_scientific.py::test_remove_publication_reverse - ... 174s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_with_some 174s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_with_none 174s ERROR tests/extensions/test_scientific.py::test_collection_doi - File "/usr... 174s ERROR tests/extensions/test_scientific.py::test_collection_citation - File ... 174s ERROR tests/extensions/test_scientific.py::test_collection_publications_one 174s ERROR tests/extensions/test_scientific.py::test_collection_publications - F... 174s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_one 174s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_one 174s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_forward 174s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_reverse 174s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_with_some 174s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_with_none 174s ERROR tests/extensions/test_storage.py::test_validate_storage - File "/usr/... 174s ERROR tests/extensions/test_storage.py::test_asset_platform - File "/usr/li... 174s ERROR tests/extensions/test_storage.py::test_asset_region - File "/usr/lib/... 174s ERROR tests/extensions/test_storage.py::test_asset_requester_pays - File "/... 174s ERROR tests/extensions/test_storage.py::test_asset_tier - File "/usr/lib/py... 174s ERROR tests/extensions/test_table.py::test_validate - File "/usr/lib/python... 174s ERROR tests/extensions/test_timestamps.py::test_validate_timestamps - File ... 174s ERROR tests/extensions/test_timestamps.py::test_expires - File "/usr/lib/py... 174s ERROR tests/extensions/test_timestamps.py::test_published - File "/usr/lib/... 174s ERROR tests/extensions/test_timestamps.py::test_unpublished - File "/usr/li... 174s ERROR tests/extensions/test_version.py::test_add_version - File "/usr/lib/p... 174s ERROR tests/extensions/test_version.py::test_version_in_properties - File "... 174s ERROR tests/extensions/test_version.py::test_add_not_deprecated_version - F... 174s ERROR tests/extensions/test_version.py::test_add_deprecated_version - File ... 174s ERROR tests/extensions/test_version.py::test_latest - File "/usr/lib/python... 174s ERROR tests/extensions/test_version.py::test_predecessor - File "/usr/lib/p... 174s ERROR tests/extensions/test_version.py::test_successor - File "/usr/lib/pyt... 174s ERROR tests/extensions/test_version.py::test_all_links - File "/usr/lib/pyt... 174s ERROR tests/extensions/test_version.py::test_collection_add_version - File ... 174s ERROR tests/extensions/test_version.py::test_collection_validate_all - File... 174s ERROR tests/extensions/test_version.py::test_catalog_add_version - File "/u... 174s ERROR tests/extensions/test_version.py::test_catalog_validate_all - File "/... 174s ERROR tests/extensions/test_version.py::test_optional_version - File "/usr/... 174s ERROR tests/extensions/test_version.py::test_assets - File "/usr/lib/python... 174s ERROR tests/extensions/test_view.py::test_validate_view - File "/usr/lib/py... 174s ERROR tests/extensions/test_view.py::test_off_nadir - File "/usr/lib/python... 174s ERROR tests/extensions/test_view.py::test_incidence_angle - File "/usr/lib/... 174s ERROR tests/extensions/test_view.py::test_azimuth - File "/usr/lib/python3/... 174s ERROR tests/extensions/test_view.py::test_sun_azimuth - File "/usr/lib/pyth... 174s ERROR tests/extensions/test_view.py::test_sun_elevation - File "/usr/lib/py... 174s ERROR tests/extensions/test_xarray_assets.py::test_item_validate - File "/u... 174s ERROR tests/extensions/test_xarray_assets.py::test_collection_validate - Fi... 174s ERROR tests/extensions/test_xarray_assets.py::test_set_field[storage_options-value0] 174s ERROR tests/extensions/test_xarray_assets.py::test_set_field[open_kwargs-value1] 174s ERROR tests/test_catalog.py::TestCatalog::test_read_remote - File "/usr/lib... 174s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat0] - File "/... 174s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat1] - File "/... 174s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat2] - File "/... 174s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat3] - File "/... 174s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat4] - File "/... 174s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat5] - File "/... 174s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat6] - File "/... 174s ERROR tests/test_catalog.py::TestCatalog::test_validate_all_invalid - File ... 174s ERROR tests/test_catalog.py::test_validate_all_with_max_n - File "/usr/lib/... 174s ERROR tests/test_catalog.py::test_validate_all_with_recusive_off - File "/u... 174s ERROR tests/test_item.py::test_null_datetime - File "/usr/lib/python3/dist-... 174s ERROR tests/test_item.py::test_null_datetime_constructor - File "/usr/lib/p... 174s ERROR tests/test_item.py::test_null_geometry - File "/usr/lib/python3/dist-... 174s ERROR tests/test_item.py::test_relative_extension_path - File "/usr/lib/pyt... 174s ERROR tests/test_item.py::test_non_hierarchical_relative_link - File "/usr/... 174s ERROR tests/test_stac_io.py::test_retry_stac_io - File "/usr/lib/python3/di... 174s ERROR tests/test_stac_io.py::test_retry_stac_io_404 - File "/usr/lib/python... 174s ERROR tests/test_stac_io.py::test_urls_with_non_ascii_characters - File "/u... 174s ERROR tests/test_stac_io.py::test_proj_json_schema_is_readable - File "/usr... 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog0] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog1] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog2] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog3] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog4] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog5] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog6] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog0] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog1] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog2] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog3] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog4] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog5] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog6] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog0] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog1] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog2] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog3] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog4] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog5] 174s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog6] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_current_version 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example0] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example1] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example2] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example3] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example4] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example5] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example6] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example7] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example8] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example9] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example10] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example11] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example12] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example13] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example14] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example15] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example16] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example17] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example18] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example19] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example20] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example21] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example22] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example23] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example24] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example25] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example26] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example27] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example28] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example29] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example30] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example31] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example32] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example33] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example34] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example35] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example36] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example37] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example38] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example39] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example40] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example41] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example42] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example43] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example44] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example45] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example46] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example47] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example48] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example49] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example50] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example51] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example52] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example53] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example54] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example55] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example56] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example57] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example58] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example59] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example60] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example61] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example62] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example63] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example64] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example65] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example66] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example67] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example68] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example69] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example70] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example71] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example72] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example73] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example74] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example75] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example76] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example77] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example78] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example79] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example80] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example81] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example82] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example83] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example84] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example85] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example86] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example87] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example88] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example89] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example90] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example91] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example92] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example93] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example94] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example95] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example96] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example97] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example98] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example99] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example100] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example101] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example102] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example103] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example104] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example105] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example106] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example107] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example108] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example109] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example110] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example111] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example112] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example113] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example114] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example115] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example116] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example117] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example118] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example119] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example120] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example121] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example122] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example123] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example124] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_error_contains_href 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_deprecated_dict_arg 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_deprecated_dict_arg_missing_href 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_unexpected_href 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all - ... 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case0] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case1] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case2] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case3] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case4] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case5] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case6] 174s ERROR tests/validation/test_validate.py::TestValidate::test_validates_geojson_with_tuple_coordinates 174s ERROR tests/validation/test_validate.py::TestValidate::test_validate_custom_validator 174s ================ 1234 passed, 18 skipped, 305 errors in 21.89s ================= 174s E: pybuild pybuild:483: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest.ZNumnY/autopkgtest_tmp/build; python3.14 -m pytest tests 174s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p "3.13 3.14" returned exit code 13 174s make: *** [/tmp/30inKrCeAJ/run:4: pybuild-autopkgtest] Error 25 174s pybuild-autopkgtest: error: /tmp/30inKrCeAJ/run pybuild-autopkgtest returned exit code 2 175s autopkgtest [13:18:33]: test pybuild-autopkgtest: -----------------------] 175s pybuild-autopkgtest FAIL non-zero exit status 25 175s autopkgtest [13:18:33]: test pybuild-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 175s autopkgtest [13:18:33]: @@@@@@@@@@@@@@@@@@@@ summary 175s pybuild-autopkgtest FAIL non-zero exit status 25