0s autopkgtest [20:12:53]: starting date and time: 2026-01-22 20:12:53+0000 0s autopkgtest [20:12:53]: git checkout: 508d4a25 a-v-ssh wait_for_ssh: demote "ssh connection failed" to a debug message 0s autopkgtest [20:12:53]: host juju-7f2275-prod-proposed-migration-environment-9; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.llhm71ys/out --timeout-copy=6000 --setup-commands 'ln -s /dev/null /etc/systemd/system/bluetooth.service; printf "http_proxy=http://squid.internal:3128\nhttps_proxy=http://squid.internal:3128\nno_proxy=127.0.0.1,127.0.1.1,localhost,localdomain,internal,login.ubuntu.com,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com\n" >> /etc/environment' --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 -- lxd -r lxd-armhf-10.145.243.142 lxd-armhf-10.145.243.142:autopkgtest/ubuntu/resolute/armhf 23s autopkgtest [20:13:16]: testbed dpkg architecture: armhf 25s autopkgtest [20:13:18]: testbed apt version: 3.1.12 29s autopkgtest [20:13:22]: @@@@@@@@@@@@@@@@@@@@ test bed setup 31s autopkgtest [20:13:24]: testbed release detected to be: None 40s autopkgtest [20:13:33]: updating testbed package index (apt update) 42s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 42s Get:2 http://ftpmaster.internal/ubuntu resolute InRelease [124 kB] 43s Get:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease [124 kB] 43s Get:4 http://ftpmaster.internal/ubuntu resolute-security InRelease [124 kB] 43s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [2820 B] 43s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [22.2 kB] 43s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1011 kB] 43s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [81.6 kB] 43s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf Packages [95.3 kB] 43s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/universe armhf Packages [658 kB] 43s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse armhf Packages [4896 B] 43s Get:12 http://ftpmaster.internal/ubuntu resolute/multiverse Sources [310 kB] 43s Get:13 http://ftpmaster.internal/ubuntu resolute/main Sources [1398 kB] 43s Get:14 http://ftpmaster.internal/ubuntu resolute/universe Sources [21.4 MB] 44s Get:15 http://ftpmaster.internal/ubuntu resolute/main armhf Packages [1371 kB] 44s Get:16 http://ftpmaster.internal/ubuntu resolute/universe armhf Packages [15.2 MB] 44s Get:17 http://ftpmaster.internal/ubuntu resolute/multiverse armhf Packages [175 kB] 47s Fetched 42.2 MB in 5s (8118 kB/s) 49s Reading package lists... 55s autopkgtest [20:13:48]: upgrading testbed (apt dist-upgrade and autopurge) 57s Reading package lists... 58s Building dependency tree... 58s Reading state information... 58s Calculating upgrade... 59s The following packages were automatically installed and are no longer required: 59s libpython3.13-minimal libpython3.13-stdlib python3.13 python3.13-minimal 59s Use 'apt autoremove' to remove them. 60s The following NEW packages will be installed: 60s libpython3.14-minimal libpython3.14-stdlib python3.14 python3.14-minimal 60s The following packages will be upgraded: 60s libplymouth5 libpython3-stdlib plymouth plymouth-theme-ubuntu-text python3 60s python3-gdbm python3-minimal 60s 7 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. 60s Need to get 6525 kB of archives. 60s After this operation, 22.5 MB of additional disk space will be used. 60s Get:1 http://ftpmaster.internal/ubuntu resolute/main armhf libpython3.14-minimal armhf 3.14.2-1 [905 kB] 60s Get:2 http://ftpmaster.internal/ubuntu resolute/main armhf python3.14-minimal armhf 3.14.2-1 [2155 kB] 60s Get:3 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf python3-gdbm armhf 3.14.2-1 [11.1 kB] 60s Get:4 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf python3-minimal armhf 3.14.2-1 [28.2 kB] 60s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf python3 armhf 3.14.2-1 [22.9 kB] 60s Get:6 http://ftpmaster.internal/ubuntu resolute/main armhf libpython3.14-stdlib armhf 3.14.2-1 [2270 kB] 60s Get:7 http://ftpmaster.internal/ubuntu resolute/main armhf python3.14 armhf 3.14.2-1 [816 kB] 60s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf libpython3-stdlib armhf 3.14.2-1 [10.9 kB] 60s Get:9 http://ftpmaster.internal/ubuntu resolute/main armhf libplymouth5 armhf 24.004.60+git20250831.4a3c171d-0ubuntu4 [147 kB] 60s Get:10 http://ftpmaster.internal/ubuntu resolute/main armhf plymouth-theme-ubuntu-text armhf 24.004.60+git20250831.4a3c171d-0ubuntu4 [10.0 kB] 60s Get:11 http://ftpmaster.internal/ubuntu resolute/main armhf plymouth armhf 24.004.60+git20250831.4a3c171d-0ubuntu4 [150 kB] 61s Fetched 6525 kB in 1s (7611 kB/s) 61s Selecting previously unselected package libpython3.14-minimal:armhf. 62s (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 ... 66485 files and directories currently installed.) 62s Preparing to unpack .../libpython3.14-minimal_3.14.2-1_armhf.deb ... 62s Unpacking libpython3.14-minimal:armhf (3.14.2-1) ... 62s Selecting previously unselected package python3.14-minimal. 62s Preparing to unpack .../python3.14-minimal_3.14.2-1_armhf.deb ... 62s Unpacking python3.14-minimal (3.14.2-1) ... 62s Preparing to unpack .../python3-gdbm_3.14.2-1_armhf.deb ... 62s Unpacking python3-gdbm (3.14.2-1) over (3.13.9-1) ... 62s Setting up libpython3.14-minimal:armhf (3.14.2-1) ... 62s Setting up python3.14-minimal (3.14.2-1) ... 64s (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 ... 66827 files and directories currently installed.) 64s Preparing to unpack .../python3-minimal_3.14.2-1_armhf.deb ... 64s Unpacking python3-minimal (3.14.2-1) over (3.13.7-1) ... 64s Setting up python3-minimal (3.14.2-1) ... 65s (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 ... 66827 files and directories currently installed.) 65s Preparing to unpack .../0-python3_3.14.2-1_armhf.deb ... 65s Unpacking python3 (3.14.2-1) over (3.13.7-1) ... 65s Selecting previously unselected package libpython3.14-stdlib:armhf. 65s Preparing to unpack .../1-libpython3.14-stdlib_3.14.2-1_armhf.deb ... 65s Unpacking libpython3.14-stdlib:armhf (3.14.2-1) ... 65s Selecting previously unselected package python3.14. 65s Preparing to unpack .../2-python3.14_3.14.2-1_armhf.deb ... 65s Unpacking python3.14 (3.14.2-1) ... 65s Preparing to unpack .../3-libpython3-stdlib_3.14.2-1_armhf.deb ... 65s Unpacking libpython3-stdlib:armhf (3.14.2-1) over (3.13.7-1) ... 65s Preparing to unpack .../4-libplymouth5_24.004.60+git20250831.4a3c171d-0ubuntu4_armhf.deb ... 65s Unpacking libplymouth5:armhf (24.004.60+git20250831.4a3c171d-0ubuntu4) over (24.004.60+git20250831.4a3c171d-0ubuntu3) ... 65s Preparing to unpack .../5-plymouth-theme-ubuntu-text_24.004.60+git20250831.4a3c171d-0ubuntu4_armhf.deb ... 65s Unpacking plymouth-theme-ubuntu-text (24.004.60+git20250831.4a3c171d-0ubuntu4) over (24.004.60+git20250831.4a3c171d-0ubuntu3) ... 65s Preparing to unpack .../6-plymouth_24.004.60+git20250831.4a3c171d-0ubuntu4_armhf.deb ... 65s Unpacking plymouth (24.004.60+git20250831.4a3c171d-0ubuntu4) over (24.004.60+git20250831.4a3c171d-0ubuntu3) ... 65s Setting up libpython3.14-stdlib:armhf (3.14.2-1) ... 65s Setting up libplymouth5:armhf (24.004.60+git20250831.4a3c171d-0ubuntu4) ... 65s Setting up python3.14 (3.14.2-1) ... 67s Setting up libpython3-stdlib:armhf (3.14.2-1) ... 67s Setting up python3-gdbm (3.14.2-1) ... 67s Setting up plymouth (24.004.60+git20250831.4a3c171d-0ubuntu4) ... 67s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 67s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 68s Setting up python3 (3.14.2-1) ... 68s Processing triggers for libc-bin (2.42-2ubuntu4) ... 68s Processing triggers for systemd (259-1ubuntu2) ... 68s Processing triggers for man-db (2.13.1-1) ... 70s Processing triggers for initramfs-tools (0.150ubuntu7) ... 70s Setting up plymouth-theme-ubuntu-text (24.004.60+git20250831.4a3c171d-0ubuntu4) ... 70s Processing triggers for initramfs-tools (0.150ubuntu7) ... 72s Reading package lists... 73s Building dependency tree... 73s Reading state information... 73s Solving dependencies... 74s The following packages will be REMOVED: 74s libpython3.13-minimal* libpython3.13-stdlib* python3.13* python3.13-minimal* 75s 0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded. 75s After this operation, 21.3 MB disk space will be freed. 75s (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 ... 67257 files and directories currently installed.) 75s Removing python3.13 (3.13.11-1) ... 75s Removing libpython3.13-stdlib:armhf (3.13.11-1) ... 75s Removing python3.13-minimal (3.13.11-1) ... 76s Removing libpython3.13-minimal:armhf (3.13.11-1) ... 76s Processing triggers for man-db (2.13.1-1) ... 77s Processing triggers for systemd (259-1ubuntu2) ... 77s (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 ... 66518 files and directories currently installed.) 77s Purging configuration files for libpython3.13-minimal:armhf (3.13.11-1) ... 77s Purging configuration files for python3.13-minimal (3.13.11-1) ... 79s autopkgtest [20:14:12]: rebooting testbed after setup commands that affected boot 122s autopkgtest [20:14:55]: testbed running kernel: Linux 6.8.0-87-generic #88~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Oct 14 14:00:09 UTC 2 150s autopkgtest [20:15:23]: @@@@@@@@@@@@@@@@@@@@ apt-source pystac 166s Get:1 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (dsc) [3523 B] 166s Get:2 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (tar) [2455 kB] 166s Get:3 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (diff) [27.7 kB] 166s gpgv: Signature made Sat Jan 10 12:09:05 2026 UTC 166s gpgv: using RSA key 3B70F209A5FFD68903C472C5EBF48AB2578F9812 166s gpgv: issuer "antonio.valentino@tiscali.it" 166s gpgv: Can't check signature: No public key 166s dpkg-source: warning: cannot verify inline signature for ./pystac_1.14.3-1.dsc: no acceptable signature found 166s autopkgtest [20:15:39]: testing package pystac version 1.14.3-1 169s autopkgtest [20:15:42]: build not needed 174s autopkgtest [20:15:47]: test pybuild-autopkgtest: preparing testbed 176s Reading package lists... 176s Building dependency tree... 176s Reading state information... 176s Solving dependencies... 177s The following NEW packages will be installed: 177s autoconf automake autopoint autotools-dev build-essential cpp cpp-15 177s cpp-15-arm-linux-gnueabihf cpp-arm-linux-gnueabihf debhelper debugedit 177s dh-autoreconf dh-python dh-strip-nondeterminism docutils-common dwz 177s fontconfig-config fonts-dejavu-core fonts-dejavu-mono fonts-mathjax g++ 177s g++-15 g++-15-arm-linux-gnueabihf g++-arm-linux-gnueabihf gcc gcc-15 177s gcc-15-arm-linux-gnueabihf gcc-arm-linux-gnueabihf gdal-data gdal-plugins 177s gettext intltool-debian libabsl20240722 libaec0 libaom3 libarchive-zip-perl 177s libarmadillo14 libarpack2t64 libasan8 libavif16 libblas3 libblosc1 177s libc-dev-bin libc6-dev libcc1-0 libcfitsio10t64 libcrypt-dev libdav1d7 177s libde265-0 libdebhelper-perl libdeflate0 libdw1t64 177s libfile-stripnondeterminism-perl libfontconfig1 libfreetype6 libfreexl1 177s libfyba0t64 libgav1-2 libgcc-15-dev libgdal36 libgeos-c1t64 libgeos3.14.1 177s libgeotiff5 libgfortran5 libgif7 libgomp1 libgpgmepp6t64 libhdf4-0-alt 177s libhdf5-310 libhdf5-hl-310 libheif-plugin-aomdec libheif-plugin-libde265 177s libheif1 libisl23 libjbig0 libjpeg-turbo8 libjpeg8 libjs-mathjax 177s libjson-perl libkmlbase1t64 libkmldom1t64 libkmlengine1t64 liblapack3 177s liblcms2-2 liblerc4 libltdl7 liblua5.4-0 libminizip1t64 libmpc3 177s libmysqlclient24 libnetcdf22 libnorm1t64 libodbc2 libodbcinst2 libogdi4.1 177s libopenjp2-7 libpgm-5.3-0t64 libpoppler147 libpq5 libproj25 177s libpython3.13-minimal libpython3.13-stdlib libqhull-r8.0 librttopo1 177s libsharpyuv0 libsnappy1v5 libsodium23 libspatialite8t64 libstdc++-15-dev 177s libsz2 libtiff6 libtool libubsan1 liburiparser1 libwebp7 libxerces-c3.2t64 177s libyuv0 libzmq5 linux-libc-dev m4 mysql-common 177s node-fortawesome-fontawesome-free pandoc pandoc-data po-debconf proj-data 177s pybuild-plugin-autopkgtest pybuild-plugin-pyproject python-pystac-doc 177s python-tinycss2-common python3-accessible-pygments python3-affine 177s python3-alabaster python3-all python3-anyio python3-astroid 177s python3-asttokens python3-bleach python3-bs4 python3-build python3-click 177s python3-click-plugins python3-cligj python3-colorama python3-decorator 177s python3-defusedxml python3-docutils python3-executing python3-fastjsonschema 177s python3-h11 python3-html5lib python3-imagesize python3-iniconfig 177s python3-installer python3-ipython python3-jedi python3-jupyter-client 177s python3-jupyter-core python3-jupyterlab-pygments python3-livereload 177s python3-matplotlib-inline python3-mistune python3-multidict python3-nbclient 177s python3-nbconvert python3-nbformat python3-nbsphinx python3-numpy 177s python3-numpy-dev python3-pandocfilters python3-parso python3-platformdirs 177s python3-pluggy python3-prompt-toolkit python3-propcache python3-psutil 177s python3-pure-eval python3-pydata-sphinx-theme python3-pyproject-hooks 177s python3-pystac python3-pytest python3-pytest-mock python3-pytest-recording 177s python3-rasterio python3-requests-mock python3-roman-numerals 177s python3-shapely python3-sniffio python3-snowballstemmer python3-soupsieve 177s python3-sphinx python3-sphinx-autobuild python3-sphinx-design 177s python3-stack-data python3-starlette python3-tinycss2 python3-tornado 177s python3-traitlets python3-typeshed python3-uvicorn python3-uvloop 177s python3-vcr python3-watchfiles python3-wcwidth python3-webencodings 177s python3-websockets python3-wheel python3-wrapt python3-wsproto python3-yarl 177s python3-zmq python3.13 python3.13-minimal rpcsvc-proto sgml-base 177s sphinx-common unixodbc-common xml-core 177s 0 upgraded, 218 newly installed, 0 to remove and 0 not upgraded. 177s Need to get 171 MB of archives. 177s After this operation, 745 MB of additional disk space will be used. 177s Get:1 http://ftpmaster.internal/ubuntu resolute/main armhf libpython3.13-minimal armhf 3.13.11-1 [875 kB] 178s Get:2 http://ftpmaster.internal/ubuntu resolute/main armhf python3.13-minimal armhf 3.13.11-1 [2055 kB] 178s Get:3 http://ftpmaster.internal/ubuntu resolute/main armhf python3-numpy-dev armhf 1:2.3.5+ds-3 [141 kB] 178s Get:4 http://ftpmaster.internal/ubuntu resolute/main armhf libblas3 armhf 3.12.1-7ubuntu1 [133 kB] 178s Get:5 http://ftpmaster.internal/ubuntu resolute/main armhf libgfortran5 armhf 15.2.0-11ubuntu1 [334 kB] 178s Get:6 http://ftpmaster.internal/ubuntu resolute/main armhf liblapack3 armhf 3.12.1-7ubuntu1 [2090 kB] 178s Get:7 http://ftpmaster.internal/ubuntu resolute/main armhf python3-numpy armhf 1:2.3.5+ds-3 [4729 kB] 178s Get:8 http://ftpmaster.internal/ubuntu resolute/main armhf libpython3.13-stdlib armhf 3.13.11-1 [1960 kB] 178s Get:9 http://ftpmaster.internal/ubuntu resolute/main armhf python3.13 armhf 3.13.11-1 [758 kB] 178s Get:10 http://ftpmaster.internal/ubuntu resolute/main armhf m4 armhf 1.4.20-2 [212 kB] 178s Get:11 http://ftpmaster.internal/ubuntu resolute/main armhf autoconf all 2.72-3.1ubuntu1 [384 kB] 178s Get:12 http://ftpmaster.internal/ubuntu resolute/main armhf autotools-dev all 20240727.1 [43.4 kB] 178s Get:13 http://ftpmaster.internal/ubuntu resolute/main armhf automake all 1:1.18.1-3build1 [582 kB] 178s Get:14 http://ftpmaster.internal/ubuntu resolute/main armhf autopoint all 0.23.2-1 [620 kB] 178s Get:15 http://ftpmaster.internal/ubuntu resolute/main armhf libc-dev-bin armhf 2.42-2ubuntu4 [21.8 kB] 178s Get:16 http://ftpmaster.internal/ubuntu resolute/main armhf linux-libc-dev armhf 6.18.0-9.9 [1819 kB] 178s Get:17 http://ftpmaster.internal/ubuntu resolute/main armhf libcrypt-dev armhf 1:4.5.1-1 [128 kB] 178s Get:18 http://ftpmaster.internal/ubuntu resolute/main armhf rpcsvc-proto armhf 1.4.3-1 [62.3 kB] 178s Get:19 http://ftpmaster.internal/ubuntu resolute/main armhf libc6-dev armhf 2.42-2ubuntu4 [1416 kB] 179s Get:20 http://ftpmaster.internal/ubuntu resolute/main armhf libisl23 armhf 0.27-1build1 [553 kB] 179s Get:21 http://ftpmaster.internal/ubuntu resolute/main armhf libmpc3 armhf 1.3.1-2 [47.0 kB] 179s Get:22 http://ftpmaster.internal/ubuntu resolute/main armhf cpp-15-arm-linux-gnueabihf armhf 15.2.0-11ubuntu1 [10.1 MB] 179s Get:23 http://ftpmaster.internal/ubuntu resolute/main armhf cpp-15 armhf 15.2.0-11ubuntu1 [1032 B] 179s Get:24 http://ftpmaster.internal/ubuntu resolute/main armhf cpp-arm-linux-gnueabihf armhf 4:15.2.0-4ubuntu1 [5756 B] 179s Get:25 http://ftpmaster.internal/ubuntu resolute/main armhf cpp armhf 4:15.2.0-4ubuntu1 [22.4 kB] 179s Get:26 http://ftpmaster.internal/ubuntu resolute/main armhf libcc1-0 armhf 15.2.0-11ubuntu1 [43.5 kB] 179s Get:27 http://ftpmaster.internal/ubuntu resolute/main armhf libgomp1 armhf 15.2.0-11ubuntu1 [129 kB] 179s Get:28 http://ftpmaster.internal/ubuntu resolute/main armhf libasan8 armhf 15.2.0-11ubuntu1 [2947 kB] 179s Get:29 http://ftpmaster.internal/ubuntu resolute/main armhf libubsan1 armhf 15.2.0-11ubuntu1 [1187 kB] 179s Get:30 http://ftpmaster.internal/ubuntu resolute/main armhf libgcc-15-dev armhf 15.2.0-11ubuntu1 [898 kB] 179s Get:31 http://ftpmaster.internal/ubuntu resolute/main armhf gcc-15-arm-linux-gnueabihf armhf 15.2.0-11ubuntu1 [19.5 MB] 180s Get:32 http://ftpmaster.internal/ubuntu resolute/main armhf gcc-15 armhf 15.2.0-11ubuntu1 [497 kB] 180s Get:33 http://ftpmaster.internal/ubuntu resolute/main armhf gcc-arm-linux-gnueabihf armhf 4:15.2.0-4ubuntu1 [1220 B] 180s Get:34 http://ftpmaster.internal/ubuntu resolute/main armhf gcc armhf 4:15.2.0-4ubuntu1 [5022 B] 180s Get:35 http://ftpmaster.internal/ubuntu resolute/main armhf libstdc++-15-dev armhf 15.2.0-11ubuntu1 [2638 kB] 180s Get:36 http://ftpmaster.internal/ubuntu resolute/main armhf g++-15-arm-linux-gnueabihf armhf 15.2.0-11ubuntu1 [11.4 MB] 180s Get:37 http://ftpmaster.internal/ubuntu resolute/main armhf g++-15 armhf 15.2.0-11ubuntu1 [24.6 kB] 180s Get:38 http://ftpmaster.internal/ubuntu resolute/main armhf g++-arm-linux-gnueabihf armhf 4:15.2.0-4ubuntu1 [968 B] 180s Get:39 http://ftpmaster.internal/ubuntu resolute/main armhf g++ armhf 4:15.2.0-4ubuntu1 [1086 B] 180s Get:40 http://ftpmaster.internal/ubuntu resolute/main armhf build-essential armhf 12.12ubuntu2 [5256 B] 180s Get:41 http://ftpmaster.internal/ubuntu resolute/main armhf libdebhelper-perl all 13.28ubuntu1 [97.4 kB] 180s Get:42 http://ftpmaster.internal/ubuntu resolute/main armhf libtool all 2.5.4-9 [169 kB] 180s Get:43 http://ftpmaster.internal/ubuntu resolute/main armhf dh-autoreconf all 21 [12.5 kB] 180s Get:44 http://ftpmaster.internal/ubuntu resolute/main armhf libarchive-zip-perl all 1.68-1 [90.2 kB] 180s Get:45 http://ftpmaster.internal/ubuntu resolute/main armhf libfile-stripnondeterminism-perl all 1.15.0-1build1 [20.6 kB] 180s Get:46 http://ftpmaster.internal/ubuntu resolute/main armhf dh-strip-nondeterminism all 1.15.0-1build1 [5110 B] 180s Get:47 http://ftpmaster.internal/ubuntu resolute/main armhf libdw1t64 armhf 0.194-1 [254 kB] 180s Get:48 http://ftpmaster.internal/ubuntu resolute/main armhf debugedit armhf 1:5.2-3 [48.9 kB] 180s Get:49 http://ftpmaster.internal/ubuntu resolute/main armhf dwz armhf 0.16-2 [114 kB] 180s Get:50 http://ftpmaster.internal/ubuntu resolute/main armhf gettext armhf 0.23.2-1 [1059 kB] 180s Get:51 http://ftpmaster.internal/ubuntu resolute/main armhf intltool-debian all 0.35.0+20060710.6build1 [24.1 kB] 180s Get:52 http://ftpmaster.internal/ubuntu resolute/main armhf po-debconf all 1.0.22 [215 kB] 180s Get:53 http://ftpmaster.internal/ubuntu resolute/main armhf debhelper all 13.28ubuntu1 [916 kB] 181s Get:54 http://ftpmaster.internal/ubuntu resolute/universe armhf dh-python all 7.20251231 [122 kB] 181s Get:55 http://ftpmaster.internal/ubuntu resolute/main armhf sgml-base all 1.31+nmu1 [11.0 kB] 181s Get:56 http://ftpmaster.internal/ubuntu resolute/main armhf xml-core all 0.19build1 [20.3 kB] 181s Get:57 http://ftpmaster.internal/ubuntu resolute/main armhf docutils-common all 0.22.4+dfsg-1 [130 kB] 181s Get:58 http://ftpmaster.internal/ubuntu resolute/main armhf fonts-dejavu-mono all 2.37-8build1 [502 kB] 181s Get:59 http://ftpmaster.internal/ubuntu resolute/main armhf fonts-dejavu-core all 2.37-8build1 [834 kB] 181s Get:60 http://ftpmaster.internal/ubuntu resolute/main armhf fontconfig-config armhf 2.15.0-2.4ubuntu1 [38.2 kB] 181s Get:61 http://ftpmaster.internal/ubuntu resolute/main armhf fonts-mathjax all 2.7.9+dfsg-1build1 [2283 kB] 181s Get:62 http://ftpmaster.internal/ubuntu resolute/universe armhf gdal-data all 3.12.1+dfsg-1 [278 kB] 181s Get:63 http://ftpmaster.internal/ubuntu resolute/universe armhf gdal-plugins armhf 3.12.1+dfsg-1 [26.8 kB] 181s Get:64 http://ftpmaster.internal/ubuntu resolute/main armhf libabsl20240722 armhf 20240722.0-4ubuntu1 [500 kB] 181s Get:65 http://ftpmaster.internal/ubuntu resolute/universe armhf libaec0 armhf 1.1.4-2 [21.1 kB] 181s Get:66 http://ftpmaster.internal/ubuntu resolute/main armhf libaom3 armhf 3.13.1-2 [1258 kB] 181s Get:67 http://ftpmaster.internal/ubuntu resolute/universe armhf libarpack2t64 armhf 3.9.1-6 [88.7 kB] 181s Get:68 http://ftpmaster.internal/ubuntu resolute/universe armhf libarmadillo14 armhf 1:14.2.3+dfsg-1 [102 kB] 181s Get:69 http://ftpmaster.internal/ubuntu resolute/universe armhf libdav1d7 armhf 1.5.3-1 [299 kB] 181s Get:70 http://ftpmaster.internal/ubuntu resolute/universe armhf libgav1-2 armhf 0.20.0-2 [330 kB] 181s Get:71 http://ftpmaster.internal/ubuntu resolute/main armhf libjpeg-turbo8 armhf 2.1.5-4ubuntu2 [127 kB] 181s Get:72 http://ftpmaster.internal/ubuntu resolute/main armhf libjpeg8 armhf 8c-2ubuntu11 [2148 B] 181s Get:73 http://ftpmaster.internal/ubuntu resolute/main armhf libyuv0 armhf 0.0.1922.20260106-1 [93.9 kB] 181s Get:74 http://ftpmaster.internal/ubuntu resolute/universe armhf libavif16 armhf 1.3.0-1ubuntu3 [98.7 kB] 181s Get:75 http://ftpmaster.internal/ubuntu resolute/main armhf libsnappy1v5 armhf 1.2.2-2 [28.6 kB] 181s Get:76 http://ftpmaster.internal/ubuntu resolute/universe armhf libblosc1 armhf 1.21.5+ds-2 [23.7 kB] 181s Get:77 http://ftpmaster.internal/ubuntu resolute/universe armhf libcfitsio10t64 armhf 4.6.3-1 [505 kB] 181s Get:78 http://ftpmaster.internal/ubuntu resolute/main armhf libde265-0 armhf 1.0.16-1build1 [159 kB] 181s Get:79 http://ftpmaster.internal/ubuntu resolute/main armhf libdeflate0 armhf 1.23-2 [38.7 kB] 181s Get:80 http://ftpmaster.internal/ubuntu resolute/main armhf libfreetype6 armhf 2.14.1+dfsg-2 [345 kB] 181s Get:81 http://ftpmaster.internal/ubuntu resolute/main armhf libfontconfig1 armhf 2.15.0-2.4ubuntu1 [116 kB] 181s Get:82 http://ftpmaster.internal/ubuntu resolute/universe armhf libfyba0t64 armhf 4.1.1-11build2 [110 kB] 181s Get:83 http://ftpmaster.internal/ubuntu resolute/universe armhf libminizip1t64 armhf 1:1.3.dfsg+really1.3.1-1ubuntu2 [20.4 kB] 181s Get:84 http://ftpmaster.internal/ubuntu resolute/universe armhf libfreexl1 armhf 2.0.0-1build3 [38.1 kB] 181s Get:85 http://ftpmaster.internal/ubuntu resolute/universe armhf libgeos3.14.1 armhf 3.14.1-2 [993 kB] 181s Get:86 http://ftpmaster.internal/ubuntu resolute/universe armhf libgeos-c1t64 armhf 3.14.1-2 [114 kB] 181s Get:87 http://ftpmaster.internal/ubuntu resolute/universe armhf proj-data all 9.7.1-1 [7950 kB] 181s Get:88 http://ftpmaster.internal/ubuntu resolute/main armhf libjbig0 armhf 2.1-6.1ubuntu3 [25.3 kB] 181s Get:89 http://ftpmaster.internal/ubuntu resolute/main armhf liblerc4 armhf 4.0.0+ds-5ubuntu2 [162 kB] 181s Get:90 http://ftpmaster.internal/ubuntu resolute/main armhf libsharpyuv0 armhf 1.5.0-0.1build1 [16.3 kB] 181s Get:91 http://ftpmaster.internal/ubuntu resolute/main armhf libwebp7 armhf 1.5.0-0.1build1 [189 kB] 181s Get:92 http://ftpmaster.internal/ubuntu resolute/main armhf libtiff6 armhf 4.7.0-3ubuntu3 [188 kB] 181s Get:93 http://ftpmaster.internal/ubuntu resolute/universe armhf libproj25 armhf 9.7.1-1 [1365 kB] 181s Get:94 http://ftpmaster.internal/ubuntu resolute/universe armhf libgeotiff5 armhf 1.7.4-1 [52.5 kB] 181s Get:95 http://ftpmaster.internal/ubuntu resolute/main armhf libgif7 armhf 5.2.2-1ubuntu3 [32.8 kB] 181s Get:96 http://ftpmaster.internal/ubuntu resolute/universe armhf libsz2 armhf 1.1.4-2 [5322 B] 181s Get:97 http://ftpmaster.internal/ubuntu resolute/universe armhf libhdf4-0-alt armhf 4.3.0-1 [253 kB] 182s Get:98 http://ftpmaster.internal/ubuntu resolute/universe armhf libhdf5-310 armhf 1.14.5+repack-4 [1422 kB] 182s Get:99 http://ftpmaster.internal/ubuntu resolute/main armhf libheif-plugin-aomdec armhf 1.21.2-1 [13.0 kB] 182s Get:100 http://ftpmaster.internal/ubuntu resolute/main armhf libheif-plugin-libde265 armhf 1.21.2-1 [13.6 kB] 182s Get:101 http://ftpmaster.internal/ubuntu resolute/main armhf libheif1 armhf 1.21.2-1 [597 kB] 182s Get:102 http://ftpmaster.internal/ubuntu resolute/universe armhf liburiparser1 armhf 0.9.8+dfsg-2 [30.3 kB] 182s Get:103 http://ftpmaster.internal/ubuntu resolute/universe armhf libkmlbase1t64 armhf 1.3.0-13 [42.4 kB] 182s Get:104 http://ftpmaster.internal/ubuntu resolute/universe armhf libkmldom1t64 armhf 1.3.0-13 [146 kB] 182s Get:105 http://ftpmaster.internal/ubuntu resolute/universe armhf libkmlengine1t64 armhf 1.3.0-13 [70.6 kB] 182s Get:106 http://ftpmaster.internal/ubuntu resolute/main armhf mysql-common all 5.8+1.1.1ubuntu2 [7002 B] 182s Get:107 http://ftpmaster.internal/ubuntu resolute/main armhf libmysqlclient24 armhf 8.4.7-0ubuntu3 [1266 kB] 182s Get:108 http://ftpmaster.internal/ubuntu resolute/universe armhf libhdf5-hl-310 armhf 1.14.5+repack-4 [58.7 kB] 182s Get:109 http://ftpmaster.internal/ubuntu resolute/universe armhf libnetcdf22 armhf 1:4.9.3-1build1 [511 kB] 182s Get:110 http://ftpmaster.internal/ubuntu resolute/main armhf libltdl7 armhf 2.5.4-9 [40.4 kB] 182s Get:111 http://ftpmaster.internal/ubuntu resolute/main armhf libodbc2 armhf 2.3.14-1 [147 kB] 182s Get:112 http://ftpmaster.internal/ubuntu resolute/main armhf unixodbc-common all 2.3.14-1 [8792 B] 182s Get:113 http://ftpmaster.internal/ubuntu resolute/main armhf libodbcinst2 armhf 2.3.14-1 [31.4 kB] 182s Get:114 http://ftpmaster.internal/ubuntu resolute/universe armhf libogdi4.1 armhf 4.1.1+ds-5 [185 kB] 182s Get:115 http://ftpmaster.internal/ubuntu resolute/main armhf libopenjp2-7 armhf 2.5.4-1 [175 kB] 182s Get:116 http://ftpmaster.internal/ubuntu resolute/main armhf libgpgmepp6t64 armhf 1.24.2-3ubuntu2 [115 kB] 182s Get:117 http://ftpmaster.internal/ubuntu resolute/main armhf liblcms2-2 armhf 2.17-1 [139 kB] 182s Get:118 http://ftpmaster.internal/ubuntu resolute/main armhf libpoppler147 armhf 25.03.0-11.1 [1046 kB] 182s Get:119 http://ftpmaster.internal/ubuntu resolute/main armhf libpq5 armhf 18.1-2 [137 kB] 182s Get:120 http://ftpmaster.internal/ubuntu resolute/universe armhf libqhull-r8.0 armhf 2020.2-8 [175 kB] 182s Get:121 http://ftpmaster.internal/ubuntu resolute/universe armhf librttopo1 armhf 1.1.0-4 [160 kB] 182s Get:122 http://ftpmaster.internal/ubuntu resolute/universe armhf libspatialite8t64 armhf 5.1.0-3ubuntu1 [2007 kB] 183s Get:123 http://ftpmaster.internal/ubuntu resolute/universe armhf libxerces-c3.2t64 armhf 3.2.4+debian-1.3build2 [827 kB] 183s Get:124 http://ftpmaster.internal/ubuntu resolute/universe armhf libgdal36 armhf 3.10.3+dfsg-1build3 [8578 kB] 183s Get:125 http://ftpmaster.internal/ubuntu resolute/main armhf libjson-perl all 4.10000-1 [81.9 kB] 183s Get:126 http://ftpmaster.internal/ubuntu resolute/main armhf liblua5.4-0 armhf 5.4.8-1 [134 kB] 183s Get:127 http://ftpmaster.internal/ubuntu resolute/universe armhf libnorm1t64 armhf 1.5.9+dfsg-4 [210 kB] 183s Get:128 http://ftpmaster.internal/ubuntu resolute/universe armhf libpgm-5.3-0t64 armhf 5.3.128~dfsg-2.1build2 [173 kB] 183s Get:129 http://ftpmaster.internal/ubuntu resolute/main armhf libsodium23 armhf 1.0.18-2 [141 kB] 183s Get:130 http://ftpmaster.internal/ubuntu resolute/universe armhf libzmq5 armhf 4.3.5-1build3 [271 kB] 183s Get:131 http://ftpmaster.internal/ubuntu resolute/universe armhf node-fortawesome-fontawesome-free all 6.7.2+ds1-1 [1653 kB] 183s Get:132 http://ftpmaster.internal/ubuntu resolute/universe armhf pandoc-data all 3.1.11.1-3build1 [78.8 kB] 183s Get:133 http://ftpmaster.internal/ubuntu resolute/universe armhf pandoc armhf 3.1.11.1+ds-4 [36.7 MB] 184s Get:134 http://ftpmaster.internal/ubuntu resolute/universe armhf pybuild-plugin-autopkgtest all 7.20251231 [1748 B] 184s Get:135 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-pyproject-hooks all 1.2.0-1 [10.2 kB] 184s Get:136 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-wheel all 0.46.1-2 [22.1 kB] 184s Get:137 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-build all 1.2.2-5 [30.9 kB] 184s Get:138 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-installer all 0.7.0+dfsg1-3 [17.4 kB] 184s Get:139 http://ftpmaster.internal/ubuntu resolute/universe armhf pybuild-plugin-pyproject all 7.20251231 [1714 B] 184s Get:140 http://ftpmaster.internal/ubuntu resolute/universe armhf python-pystac-doc all 1.14.3-1 [2276 kB] 184s Get:141 http://ftpmaster.internal/ubuntu resolute/universe armhf python-tinycss2-common all 1.5.1-1 [47.3 kB] 184s Get:142 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-accessible-pygments all 0.0.5-2build1 [790 kB] 184s Get:143 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-affine all 2.4.0-2 [14.0 kB] 184s Get:144 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf python3-all armhf 3.14.2-1 [888 B] 184s Get:145 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-sniffio all 1.3.1-1 [7262 B] 184s Get:146 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-anyio all 4.11.0-3 [72.6 kB] 184s Get:147 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-astroid all 4.0.2-1ubuntu1 [172 kB] 184s Get:148 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-asttokens all 3.0.1-1 [20.7 kB] 184s Get:149 http://ftpmaster.internal/ubuntu resolute/main armhf python3-webencodings all 0.5.1-5build1 [11.7 kB] 184s Get:150 http://ftpmaster.internal/ubuntu resolute/main armhf python3-html5lib all 1.2-3 [90.6 kB] 184s Get:151 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-bleach all 6.3.0-1 [44.2 kB] 184s Get:152 http://ftpmaster.internal/ubuntu resolute/main armhf python3-soupsieve all 2.8.1-1 [33.7 kB] 184s Get:153 http://ftpmaster.internal/ubuntu resolute/main armhf python3-bs4 all 4.14.3-2build1 [84.8 kB] 184s Get:154 http://ftpmaster.internal/ubuntu resolute/main armhf python3-click all 8.2.0+0.really.8.1.8-1build1 [80.2 kB] 184s Get:155 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-click-plugins all 1.1.1-5 [9760 B] 184s Get:156 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-cligj all 0.7.2-3 [8006 B] 184s Get:157 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-colorama all 0.4.6-4build1 [32.2 kB] 184s Get:158 http://ftpmaster.internal/ubuntu resolute/main armhf python3-decorator all 5.2.1-2 [28.1 kB] 184s Get:159 http://ftpmaster.internal/ubuntu resolute/main armhf python3-defusedxml all 0.7.1-3build1 [42.4 kB] 184s Get:160 http://ftpmaster.internal/ubuntu resolute/main armhf python3-roman-numerals all 4.1.0-1 [8660 B] 184s Get:161 http://ftpmaster.internal/ubuntu resolute/main armhf python3-docutils all 0.22.4+dfsg-1 [439 kB] 184s Get:162 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-executing all 2.2.1-0.1 [26.2 kB] 184s Get:163 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-fastjsonschema all 2.21.1-1 [20.4 kB] 184s Get:164 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-h11 all 0.14.0-1.1 [51.6 kB] 184s Get:165 http://ftpmaster.internal/ubuntu resolute/main armhf python3-imagesize all 1.4.1-1build1 [6900 B] 184s Get:166 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-iniconfig all 2.1.0-2 [6962 B] 184s Get:167 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-parso all 0.8.5-1 [68.0 kB] 184s Get:168 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-typeshed all 0.0~git20241223.ea91db2-4 [1554 kB] 184s Get:169 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-jedi all 0.19.1+ds1-1build1 [694 kB] 184s Get:170 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-traitlets all 5.14.3+really5.14.3-2 [71.7 kB] 184s Get:171 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-matplotlib-inline all 0.2.1-1 [9462 B] 184s Get:172 http://ftpmaster.internal/ubuntu resolute/main armhf python3-wcwidth all 0.2.14+dfsg1-1build1 [26.5 kB] 184s Get:173 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-prompt-toolkit all 3.0.52-2 [258 kB] 184s Get:174 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-pure-eval all 0.2.3-1 [11.4 kB] 184s Get:175 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-stack-data all 0.6.3-3 [22.2 kB] 184s Get:176 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-ipython all 8.35.0-2 [575 kB] 184s Get:177 http://ftpmaster.internal/ubuntu resolute/main armhf python3-platformdirs all 4.5.1-1 [17.1 kB] 184s Get:178 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-jupyter-core all 5.9.1-1 [28.9 kB] 184s Get:179 http://ftpmaster.internal/ubuntu resolute/main armhf python3-psutil armhf 7.1.0-1ubuntu1 [189 kB] 184s Get:180 http://ftpmaster.internal/ubuntu resolute/main armhf python3-tornado armhf 6.5.4-0.1 [306 kB] 184s Get:181 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-zmq armhf 27.1.0-1 [223 kB] 184s Get:182 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-jupyter-client all 8.7.0-1 [78.5 kB] 184s Get:183 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-jupyterlab-pygments all 0.2.2-3build1 [6188 B] 184s Get:184 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-livereload all 2.7.1-0.1 [22.7 kB] 184s Get:185 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-mistune all 3.1.4-1 [35.0 kB] 184s Get:186 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-multidict armhf 6.4.3-1build1 [67.0 kB] 184s Get:187 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-nbformat all 5.10.4-1 [39.2 kB] 185s Get:188 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-nbclient all 0.10.4-1 [22.6 kB] 185s Get:189 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-tinycss2 all 1.5.1-1 [23.3 kB] 185s Get:190 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-pandocfilters all 1.5.1-1 [23.6 kB] 185s Get:191 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-nbconvert all 7.16.6-1 [140 kB] 185s Get:192 http://ftpmaster.internal/ubuntu resolute/main armhf sphinx-common all 8.2.3-12 [657 kB] 185s Get:193 http://ftpmaster.internal/ubuntu resolute/main armhf python3-alabaster all 0.7.16-0.1build1 [18.6 kB] 185s Get:194 http://ftpmaster.internal/ubuntu resolute/main armhf python3-snowballstemmer all 3.0.1-1 [65.9 kB] 185s Get:195 http://ftpmaster.internal/ubuntu resolute/main armhf python3-sphinx all 8.2.3-12 [483 kB] 185s Get:196 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-nbsphinx all 0.9.5+ds-1 [41.0 kB] 185s Get:197 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-pluggy all 1.6.0-2 [21.1 kB] 185s Get:198 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-propcache armhf 0.3.1-1build1 [50.5 kB] 185s Get:199 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-pydata-sphinx-theme all 0.16.1+dfsg-5 [944 kB] 185s Get:200 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-pystac all 1.14.3-1 [150 kB] 185s Get:201 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-pytest all 9.0.2-2 [277 kB] 185s Get:202 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-pytest-mock all 3.15.1-1 [11.9 kB] 185s Get:203 http://ftpmaster.internal/ubuntu resolute/main armhf python3-wrapt armhf 1.17.3-3 [38.2 kB] 185s Get:204 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-yarl armhf 1.22.0-1 [97.6 kB] 185s Get:205 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-vcr all 7.0.0-2 [33.3 kB] 185s Get:206 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-pytest-recording all 0.13.4-1 [15.9 kB] 185s Get:207 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-rasterio armhf 1.4.3-2build2 [1952 kB] 185s Get:208 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-requests-mock all 1.12.1-4 [17.9 kB] 185s Get:209 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-shapely armhf 2.1.2-1ubuntu1 [403 kB] 185s Get:210 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-starlette all 0.50.0-1 [53.0 kB] 185s Get:211 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-uvloop armhf 0.22.1+ds1-2 [850 kB] 185s Get:212 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-wsproto all 1.3.2-1 [21.8 kB] 185s Get:213 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-uvicorn all 0.38.0-1 [45.9 kB] 185s Get:214 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-watchfiles armhf 1.1.1-2 [368 kB] 185s Get:215 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-websockets armhf 15.0.1-1build1 [98.1 kB] 185s Get:216 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-sphinx-autobuild all 2025.08.25-1 [12.0 kB] 185s Get:217 http://ftpmaster.internal/ubuntu resolute/universe armhf python3-sphinx-design all 0.6.1-2 [894 kB] 185s Get:218 http://ftpmaster.internal/ubuntu resolute/main armhf libjs-mathjax all 2.7.9+dfsg-1build1 [6017 kB] 187s Fetched 171 MB in 8s (20.5 MB/s) 187s Selecting previously unselected package libpython3.13-minimal:armhf. 187s (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 ... 66518 files and directories currently installed.) 187s Preparing to unpack .../000-libpython3.13-minimal_3.13.11-1_armhf.deb ... 187s Unpacking libpython3.13-minimal:armhf (3.13.11-1) ... 187s Selecting previously unselected package python3.13-minimal. 187s Preparing to unpack .../001-python3.13-minimal_3.13.11-1_armhf.deb ... 187s Unpacking python3.13-minimal (3.13.11-1) ... 187s Selecting previously unselected package python3-numpy-dev:armhf. 187s Preparing to unpack .../002-python3-numpy-dev_1%3a2.3.5+ds-3_armhf.deb ... 187s Unpacking python3-numpy-dev:armhf (1:2.3.5+ds-3) ... 187s Selecting previously unselected package libblas3:armhf. 187s Preparing to unpack .../003-libblas3_3.12.1-7ubuntu1_armhf.deb ... 187s Unpacking libblas3:armhf (3.12.1-7ubuntu1) ... 187s Selecting previously unselected package libgfortran5:armhf. 187s Preparing to unpack .../004-libgfortran5_15.2.0-11ubuntu1_armhf.deb ... 187s Unpacking libgfortran5:armhf (15.2.0-11ubuntu1) ... 187s Selecting previously unselected package liblapack3:armhf. 187s Preparing to unpack .../005-liblapack3_3.12.1-7ubuntu1_armhf.deb ... 187s Unpacking liblapack3:armhf (3.12.1-7ubuntu1) ... 187s Selecting previously unselected package python3-numpy. 187s Preparing to unpack .../006-python3-numpy_1%3a2.3.5+ds-3_armhf.deb ... 187s Unpacking python3-numpy (1:2.3.5+ds-3) ... 188s Selecting previously unselected package libpython3.13-stdlib:armhf. 188s Preparing to unpack .../007-libpython3.13-stdlib_3.13.11-1_armhf.deb ... 188s Unpacking libpython3.13-stdlib:armhf (3.13.11-1) ... 188s Selecting previously unselected package python3.13. 188s Preparing to unpack .../008-python3.13_3.13.11-1_armhf.deb ... 188s Unpacking python3.13 (3.13.11-1) ... 188s Selecting previously unselected package m4. 188s Preparing to unpack .../009-m4_1.4.20-2_armhf.deb ... 188s Unpacking m4 (1.4.20-2) ... 188s Selecting previously unselected package autoconf. 188s Preparing to unpack .../010-autoconf_2.72-3.1ubuntu1_all.deb ... 188s Unpacking autoconf (2.72-3.1ubuntu1) ... 188s Selecting previously unselected package autotools-dev. 188s Preparing to unpack .../011-autotools-dev_20240727.1_all.deb ... 188s Unpacking autotools-dev (20240727.1) ... 188s Selecting previously unselected package automake. 188s Preparing to unpack .../012-automake_1%3a1.18.1-3build1_all.deb ... 188s Unpacking automake (1:1.18.1-3build1) ... 188s Selecting previously unselected package autopoint. 188s Preparing to unpack .../013-autopoint_0.23.2-1_all.deb ... 188s Unpacking autopoint (0.23.2-1) ... 189s Selecting previously unselected package libc-dev-bin. 189s Preparing to unpack .../014-libc-dev-bin_2.42-2ubuntu4_armhf.deb ... 189s Unpacking libc-dev-bin (2.42-2ubuntu4) ... 189s Selecting previously unselected package linux-libc-dev:armhf. 189s Preparing to unpack .../015-linux-libc-dev_6.18.0-9.9_armhf.deb ... 189s Unpacking linux-libc-dev:armhf (6.18.0-9.9) ... 189s Selecting previously unselected package libcrypt-dev:armhf. 189s Preparing to unpack .../016-libcrypt-dev_1%3a4.5.1-1_armhf.deb ... 189s Unpacking libcrypt-dev:armhf (1:4.5.1-1) ... 189s Selecting previously unselected package rpcsvc-proto. 189s Preparing to unpack .../017-rpcsvc-proto_1.4.3-1_armhf.deb ... 189s Unpacking rpcsvc-proto (1.4.3-1) ... 189s Selecting previously unselected package libc6-dev:armhf. 189s Preparing to unpack .../018-libc6-dev_2.42-2ubuntu4_armhf.deb ... 189s Unpacking libc6-dev:armhf (2.42-2ubuntu4) ... 189s Selecting previously unselected package libisl23:armhf. 189s Preparing to unpack .../019-libisl23_0.27-1build1_armhf.deb ... 189s Unpacking libisl23:armhf (0.27-1build1) ... 189s Selecting previously unselected package libmpc3:armhf. 189s Preparing to unpack .../020-libmpc3_1.3.1-2_armhf.deb ... 189s Unpacking libmpc3:armhf (1.3.1-2) ... 189s Selecting previously unselected package cpp-15-arm-linux-gnueabihf. 189s Preparing to unpack .../021-cpp-15-arm-linux-gnueabihf_15.2.0-11ubuntu1_armhf.deb ... 189s Unpacking cpp-15-arm-linux-gnueabihf (15.2.0-11ubuntu1) ... 190s Selecting previously unselected package cpp-15. 190s Preparing to unpack .../022-cpp-15_15.2.0-11ubuntu1_armhf.deb ... 190s Unpacking cpp-15 (15.2.0-11ubuntu1) ... 190s Selecting previously unselected package cpp-arm-linux-gnueabihf. 190s Preparing to unpack .../023-cpp-arm-linux-gnueabihf_4%3a15.2.0-4ubuntu1_armhf.deb ... 190s Unpacking cpp-arm-linux-gnueabihf (4:15.2.0-4ubuntu1) ... 190s Selecting previously unselected package cpp. 190s Preparing to unpack .../024-cpp_4%3a15.2.0-4ubuntu1_armhf.deb ... 190s Unpacking cpp (4:15.2.0-4ubuntu1) ... 190s Selecting previously unselected package libcc1-0:armhf. 190s Preparing to unpack .../025-libcc1-0_15.2.0-11ubuntu1_armhf.deb ... 190s Unpacking libcc1-0:armhf (15.2.0-11ubuntu1) ... 190s Selecting previously unselected package libgomp1:armhf. 190s Preparing to unpack .../026-libgomp1_15.2.0-11ubuntu1_armhf.deb ... 190s Unpacking libgomp1:armhf (15.2.0-11ubuntu1) ... 190s Selecting previously unselected package libasan8:armhf. 190s Preparing to unpack .../027-libasan8_15.2.0-11ubuntu1_armhf.deb ... 190s Unpacking libasan8:armhf (15.2.0-11ubuntu1) ... 190s Selecting previously unselected package libubsan1:armhf. 190s Preparing to unpack .../028-libubsan1_15.2.0-11ubuntu1_armhf.deb ... 190s Unpacking libubsan1:armhf (15.2.0-11ubuntu1) ... 190s Selecting previously unselected package libgcc-15-dev:armhf. 190s Preparing to unpack .../029-libgcc-15-dev_15.2.0-11ubuntu1_armhf.deb ... 190s Unpacking libgcc-15-dev:armhf (15.2.0-11ubuntu1) ... 190s Selecting previously unselected package gcc-15-arm-linux-gnueabihf. 190s Preparing to unpack .../030-gcc-15-arm-linux-gnueabihf_15.2.0-11ubuntu1_armhf.deb ... 190s Unpacking gcc-15-arm-linux-gnueabihf (15.2.0-11ubuntu1) ... 191s Selecting previously unselected package gcc-15. 191s Preparing to unpack .../031-gcc-15_15.2.0-11ubuntu1_armhf.deb ... 191s Unpacking gcc-15 (15.2.0-11ubuntu1) ... 191s Selecting previously unselected package gcc-arm-linux-gnueabihf. 191s Preparing to unpack .../032-gcc-arm-linux-gnueabihf_4%3a15.2.0-4ubuntu1_armhf.deb ... 191s Unpacking gcc-arm-linux-gnueabihf (4:15.2.0-4ubuntu1) ... 191s Selecting previously unselected package gcc. 191s Preparing to unpack .../033-gcc_4%3a15.2.0-4ubuntu1_armhf.deb ... 191s Unpacking gcc (4:15.2.0-4ubuntu1) ... 191s Selecting previously unselected package libstdc++-15-dev:armhf. 191s Preparing to unpack .../034-libstdc++-15-dev_15.2.0-11ubuntu1_armhf.deb ... 191s Unpacking libstdc++-15-dev:armhf (15.2.0-11ubuntu1) ... 191s Selecting previously unselected package g++-15-arm-linux-gnueabihf. 191s Preparing to unpack .../035-g++-15-arm-linux-gnueabihf_15.2.0-11ubuntu1_armhf.deb ... 191s Unpacking g++-15-arm-linux-gnueabihf (15.2.0-11ubuntu1) ... 192s Selecting previously unselected package g++-15. 192s Preparing to unpack .../036-g++-15_15.2.0-11ubuntu1_armhf.deb ... 192s Unpacking g++-15 (15.2.0-11ubuntu1) ... 192s Selecting previously unselected package g++-arm-linux-gnueabihf. 192s Preparing to unpack .../037-g++-arm-linux-gnueabihf_4%3a15.2.0-4ubuntu1_armhf.deb ... 192s Unpacking g++-arm-linux-gnueabihf (4:15.2.0-4ubuntu1) ... 192s Selecting previously unselected package g++. 192s Preparing to unpack .../038-g++_4%3a15.2.0-4ubuntu1_armhf.deb ... 192s Unpacking g++ (4:15.2.0-4ubuntu1) ... 192s Selecting previously unselected package build-essential. 192s Preparing to unpack .../039-build-essential_12.12ubuntu2_armhf.deb ... 192s Unpacking build-essential (12.12ubuntu2) ... 192s Selecting previously unselected package libdebhelper-perl. 192s Preparing to unpack .../040-libdebhelper-perl_13.28ubuntu1_all.deb ... 192s Unpacking libdebhelper-perl (13.28ubuntu1) ... 192s Selecting previously unselected package libtool. 192s Preparing to unpack .../041-libtool_2.5.4-9_all.deb ... 192s Unpacking libtool (2.5.4-9) ... 192s Selecting previously unselected package dh-autoreconf. 192s Preparing to unpack .../042-dh-autoreconf_21_all.deb ... 192s Unpacking dh-autoreconf (21) ... 192s Selecting previously unselected package libarchive-zip-perl. 192s Preparing to unpack .../043-libarchive-zip-perl_1.68-1_all.deb ... 192s Unpacking libarchive-zip-perl (1.68-1) ... 192s Selecting previously unselected package libfile-stripnondeterminism-perl. 192s Preparing to unpack .../044-libfile-stripnondeterminism-perl_1.15.0-1build1_all.deb ... 192s Unpacking libfile-stripnondeterminism-perl (1.15.0-1build1) ... 192s Selecting previously unselected package dh-strip-nondeterminism. 192s Preparing to unpack .../045-dh-strip-nondeterminism_1.15.0-1build1_all.deb ... 192s Unpacking dh-strip-nondeterminism (1.15.0-1build1) ... 192s Selecting previously unselected package libdw1t64:armhf. 192s Preparing to unpack .../046-libdw1t64_0.194-1_armhf.deb ... 192s Unpacking libdw1t64:armhf (0.194-1) ... 192s Selecting previously unselected package debugedit. 192s Preparing to unpack .../047-debugedit_1%3a5.2-3_armhf.deb ... 192s Unpacking debugedit (1:5.2-3) ... 192s Selecting previously unselected package dwz. 192s Preparing to unpack .../048-dwz_0.16-2_armhf.deb ... 192s Unpacking dwz (0.16-2) ... 192s Selecting previously unselected package gettext. 192s Preparing to unpack .../049-gettext_0.23.2-1_armhf.deb ... 192s Unpacking gettext (0.23.2-1) ... 193s Selecting previously unselected package intltool-debian. 193s Preparing to unpack .../050-intltool-debian_0.35.0+20060710.6build1_all.deb ... 193s Unpacking intltool-debian (0.35.0+20060710.6build1) ... 193s Selecting previously unselected package po-debconf. 193s Preparing to unpack .../051-po-debconf_1.0.22_all.deb ... 193s Unpacking po-debconf (1.0.22) ... 193s Selecting previously unselected package debhelper. 193s Preparing to unpack .../052-debhelper_13.28ubuntu1_all.deb ... 193s Unpacking debhelper (13.28ubuntu1) ... 193s Selecting previously unselected package dh-python. 193s Preparing to unpack .../053-dh-python_7.20251231_all.deb ... 193s Unpacking dh-python (7.20251231) ... 193s Selecting previously unselected package sgml-base. 193s Preparing to unpack .../054-sgml-base_1.31+nmu1_all.deb ... 193s Unpacking sgml-base (1.31+nmu1) ... 193s Selecting previously unselected package xml-core. 193s Preparing to unpack .../055-xml-core_0.19build1_all.deb ... 193s Unpacking xml-core (0.19build1) ... 193s Selecting previously unselected package docutils-common. 193s Preparing to unpack .../056-docutils-common_0.22.4+dfsg-1_all.deb ... 193s Unpacking docutils-common (0.22.4+dfsg-1) ... 193s Selecting previously unselected package fonts-dejavu-mono. 193s Preparing to unpack .../057-fonts-dejavu-mono_2.37-8build1_all.deb ... 193s Unpacking fonts-dejavu-mono (2.37-8build1) ... 193s Selecting previously unselected package fonts-dejavu-core. 193s Preparing to unpack .../058-fonts-dejavu-core_2.37-8build1_all.deb ... 193s Unpacking fonts-dejavu-core (2.37-8build1) ... 193s Selecting previously unselected package fontconfig-config. 193s Preparing to unpack .../059-fontconfig-config_2.15.0-2.4ubuntu1_armhf.deb ... 194s Unpacking fontconfig-config (2.15.0-2.4ubuntu1) ... 194s Selecting previously unselected package fonts-mathjax. 194s Preparing to unpack .../060-fonts-mathjax_2.7.9+dfsg-1build1_all.deb ... 194s Unpacking fonts-mathjax (2.7.9+dfsg-1build1) ... 194s Selecting previously unselected package gdal-data. 194s Preparing to unpack .../061-gdal-data_3.12.1+dfsg-1_all.deb ... 194s Unpacking gdal-data (3.12.1+dfsg-1) ... 194s Selecting previously unselected package gdal-plugins:armhf. 194s Preparing to unpack .../062-gdal-plugins_3.12.1+dfsg-1_armhf.deb ... 194s Unpacking gdal-plugins:armhf (3.12.1+dfsg-1) ... 194s Selecting previously unselected package libabsl20240722:armhf. 194s Preparing to unpack .../063-libabsl20240722_20240722.0-4ubuntu1_armhf.deb ... 194s Unpacking libabsl20240722:armhf (20240722.0-4ubuntu1) ... 194s Selecting previously unselected package libaec0:armhf. 194s Preparing to unpack .../064-libaec0_1.1.4-2_armhf.deb ... 194s Unpacking libaec0:armhf (1.1.4-2) ... 194s Selecting previously unselected package libaom3:armhf. 194s Preparing to unpack .../065-libaom3_3.13.1-2_armhf.deb ... 194s Unpacking libaom3:armhf (3.13.1-2) ... 194s Selecting previously unselected package libarpack2t64:armhf. 194s Preparing to unpack .../066-libarpack2t64_3.9.1-6_armhf.deb ... 194s Unpacking libarpack2t64:armhf (3.9.1-6) ... 194s Selecting previously unselected package libarmadillo14. 194s Preparing to unpack .../067-libarmadillo14_1%3a14.2.3+dfsg-1_armhf.deb ... 194s Unpacking libarmadillo14 (1:14.2.3+dfsg-1) ... 194s Selecting previously unselected package libdav1d7:armhf. 195s Preparing to unpack .../068-libdav1d7_1.5.3-1_armhf.deb ... 195s Unpacking libdav1d7:armhf (1.5.3-1) ... 195s Selecting previously unselected package libgav1-2:armhf. 195s Preparing to unpack .../069-libgav1-2_0.20.0-2_armhf.deb ... 195s Unpacking libgav1-2:armhf (0.20.0-2) ... 195s Selecting previously unselected package libjpeg-turbo8:armhf. 195s Preparing to unpack .../070-libjpeg-turbo8_2.1.5-4ubuntu2_armhf.deb ... 195s Unpacking libjpeg-turbo8:armhf (2.1.5-4ubuntu2) ... 195s Selecting previously unselected package libjpeg8:armhf. 195s Preparing to unpack .../071-libjpeg8_8c-2ubuntu11_armhf.deb ... 195s Unpacking libjpeg8:armhf (8c-2ubuntu11) ... 195s Selecting previously unselected package libyuv0:armhf. 195s Preparing to unpack .../072-libyuv0_0.0.1922.20260106-1_armhf.deb ... 195s Unpacking libyuv0:armhf (0.0.1922.20260106-1) ... 195s Selecting previously unselected package libavif16:armhf. 195s Preparing to unpack .../073-libavif16_1.3.0-1ubuntu3_armhf.deb ... 195s Unpacking libavif16:armhf (1.3.0-1ubuntu3) ... 195s Selecting previously unselected package libsnappy1v5:armhf. 195s Preparing to unpack .../074-libsnappy1v5_1.2.2-2_armhf.deb ... 195s Unpacking libsnappy1v5:armhf (1.2.2-2) ... 195s Selecting previously unselected package libblosc1:armhf. 195s Preparing to unpack .../075-libblosc1_1.21.5+ds-2_armhf.deb ... 195s Unpacking libblosc1:armhf (1.21.5+ds-2) ... 195s Selecting previously unselected package libcfitsio10t64:armhf. 195s Preparing to unpack .../076-libcfitsio10t64_4.6.3-1_armhf.deb ... 195s Unpacking libcfitsio10t64:armhf (4.6.3-1) ... 195s Selecting previously unselected package libde265-0:armhf. 195s Preparing to unpack .../077-libde265-0_1.0.16-1build1_armhf.deb ... 195s Unpacking libde265-0:armhf (1.0.16-1build1) ... 195s Selecting previously unselected package libdeflate0:armhf. 195s Preparing to unpack .../078-libdeflate0_1.23-2_armhf.deb ... 195s Unpacking libdeflate0:armhf (1.23-2) ... 195s Selecting previously unselected package libfreetype6:armhf. 195s Preparing to unpack .../079-libfreetype6_2.14.1+dfsg-2_armhf.deb ... 195s Unpacking libfreetype6:armhf (2.14.1+dfsg-2) ... 195s Selecting previously unselected package libfontconfig1:armhf. 195s Preparing to unpack .../080-libfontconfig1_2.15.0-2.4ubuntu1_armhf.deb ... 195s Unpacking libfontconfig1:armhf (2.15.0-2.4ubuntu1) ... 195s Selecting previously unselected package libfyba0t64:armhf. 195s Preparing to unpack .../081-libfyba0t64_4.1.1-11build2_armhf.deb ... 195s Unpacking libfyba0t64:armhf (4.1.1-11build2) ... 195s Selecting previously unselected package libminizip1t64:armhf. 195s Preparing to unpack .../082-libminizip1t64_1%3a1.3.dfsg+really1.3.1-1ubuntu2_armhf.deb ... 195s Unpacking libminizip1t64:armhf (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 195s Selecting previously unselected package libfreexl1:armhf. 195s Preparing to unpack .../083-libfreexl1_2.0.0-1build3_armhf.deb ... 195s Unpacking libfreexl1:armhf (2.0.0-1build3) ... 195s Selecting previously unselected package libgeos3.14.1:armhf. 195s Preparing to unpack .../084-libgeos3.14.1_3.14.1-2_armhf.deb ... 195s Unpacking libgeos3.14.1:armhf (3.14.1-2) ... 195s Selecting previously unselected package libgeos-c1t64:armhf. 196s Preparing to unpack .../085-libgeos-c1t64_3.14.1-2_armhf.deb ... 196s Unpacking libgeos-c1t64:armhf (3.14.1-2) ... 196s Selecting previously unselected package proj-data. 196s Preparing to unpack .../086-proj-data_9.7.1-1_all.deb ... 196s Unpacking proj-data (9.7.1-1) ... 196s Selecting previously unselected package libjbig0:armhf. 196s Preparing to unpack .../087-libjbig0_2.1-6.1ubuntu3_armhf.deb ... 196s Unpacking libjbig0:armhf (2.1-6.1ubuntu3) ... 196s Selecting previously unselected package liblerc4:armhf. 196s Preparing to unpack .../088-liblerc4_4.0.0+ds-5ubuntu2_armhf.deb ... 196s Unpacking liblerc4:armhf (4.0.0+ds-5ubuntu2) ... 196s Selecting previously unselected package libsharpyuv0:armhf. 196s Preparing to unpack .../089-libsharpyuv0_1.5.0-0.1build1_armhf.deb ... 196s Unpacking libsharpyuv0:armhf (1.5.0-0.1build1) ... 196s Selecting previously unselected package libwebp7:armhf. 196s Preparing to unpack .../090-libwebp7_1.5.0-0.1build1_armhf.deb ... 196s Unpacking libwebp7:armhf (1.5.0-0.1build1) ... 196s Selecting previously unselected package libtiff6:armhf. 196s Preparing to unpack .../091-libtiff6_4.7.0-3ubuntu3_armhf.deb ... 196s Unpacking libtiff6:armhf (4.7.0-3ubuntu3) ... 196s Selecting previously unselected package libproj25:armhf. 196s Preparing to unpack .../092-libproj25_9.7.1-1_armhf.deb ... 196s Unpacking libproj25:armhf (9.7.1-1) ... 196s Selecting previously unselected package libgeotiff5:armhf. 196s Preparing to unpack .../093-libgeotiff5_1.7.4-1_armhf.deb ... 196s Unpacking libgeotiff5:armhf (1.7.4-1) ... 196s Selecting previously unselected package libgif7:armhf. 196s Preparing to unpack .../094-libgif7_5.2.2-1ubuntu3_armhf.deb ... 196s Unpacking libgif7:armhf (5.2.2-1ubuntu3) ... 196s Selecting previously unselected package libsz2:armhf. 196s Preparing to unpack .../095-libsz2_1.1.4-2_armhf.deb ... 196s Unpacking libsz2:armhf (1.1.4-2) ... 196s Selecting previously unselected package libhdf4-0-alt:armhf. 196s Preparing to unpack .../096-libhdf4-0-alt_4.3.0-1_armhf.deb ... 196s Unpacking libhdf4-0-alt:armhf (4.3.0-1) ... 196s Selecting previously unselected package libhdf5-310:armhf. 196s Preparing to unpack .../097-libhdf5-310_1.14.5+repack-4_armhf.deb ... 196s Unpacking libhdf5-310:armhf (1.14.5+repack-4) ... 196s Selecting previously unselected package libheif-plugin-aomdec:armhf. 197s Preparing to unpack .../098-libheif-plugin-aomdec_1.21.2-1_armhf.deb ... 197s Unpacking libheif-plugin-aomdec:armhf (1.21.2-1) ... 197s Selecting previously unselected package libheif-plugin-libde265:armhf. 197s Preparing to unpack .../099-libheif-plugin-libde265_1.21.2-1_armhf.deb ... 197s Unpacking libheif-plugin-libde265:armhf (1.21.2-1) ... 197s Selecting previously unselected package libheif1:armhf. 197s Preparing to unpack .../100-libheif1_1.21.2-1_armhf.deb ... 197s Unpacking libheif1:armhf (1.21.2-1) ... 197s Selecting previously unselected package liburiparser1:armhf. 197s Preparing to unpack .../101-liburiparser1_0.9.8+dfsg-2_armhf.deb ... 197s Unpacking liburiparser1:armhf (0.9.8+dfsg-2) ... 197s Selecting previously unselected package libkmlbase1t64:armhf. 197s Preparing to unpack .../102-libkmlbase1t64_1.3.0-13_armhf.deb ... 197s Unpacking libkmlbase1t64:armhf (1.3.0-13) ... 197s Selecting previously unselected package libkmldom1t64:armhf. 197s Preparing to unpack .../103-libkmldom1t64_1.3.0-13_armhf.deb ... 197s Unpacking libkmldom1t64:armhf (1.3.0-13) ... 197s Selecting previously unselected package libkmlengine1t64:armhf. 197s Preparing to unpack .../104-libkmlengine1t64_1.3.0-13_armhf.deb ... 197s Unpacking libkmlengine1t64:armhf (1.3.0-13) ... 197s Selecting previously unselected package mysql-common. 197s Preparing to unpack .../105-mysql-common_5.8+1.1.1ubuntu2_all.deb ... 197s Unpacking mysql-common (5.8+1.1.1ubuntu2) ... 197s Selecting previously unselected package libmysqlclient24:armhf. 197s Preparing to unpack .../106-libmysqlclient24_8.4.7-0ubuntu3_armhf.deb ... 197s Unpacking libmysqlclient24:armhf (8.4.7-0ubuntu3) ... 197s Selecting previously unselected package libhdf5-hl-310:armhf. 197s Preparing to unpack .../107-libhdf5-hl-310_1.14.5+repack-4_armhf.deb ... 197s Unpacking libhdf5-hl-310:armhf (1.14.5+repack-4) ... 197s Selecting previously unselected package libnetcdf22:armhf. 197s Preparing to unpack .../108-libnetcdf22_1%3a4.9.3-1build1_armhf.deb ... 197s Unpacking libnetcdf22:armhf (1:4.9.3-1build1) ... 197s Selecting previously unselected package libltdl7:armhf. 197s Preparing to unpack .../109-libltdl7_2.5.4-9_armhf.deb ... 197s Unpacking libltdl7:armhf (2.5.4-9) ... 197s Selecting previously unselected package libodbc2:armhf. 197s Preparing to unpack .../110-libodbc2_2.3.14-1_armhf.deb ... 197s Unpacking libodbc2:armhf (2.3.14-1) ... 198s Selecting previously unselected package unixodbc-common. 198s Preparing to unpack .../111-unixodbc-common_2.3.14-1_all.deb ... 198s Unpacking unixodbc-common (2.3.14-1) ... 198s Selecting previously unselected package libodbcinst2:armhf. 198s Preparing to unpack .../112-libodbcinst2_2.3.14-1_armhf.deb ... 198s Unpacking libodbcinst2:armhf (2.3.14-1) ... 198s Selecting previously unselected package libogdi4.1:armhf. 198s Preparing to unpack .../113-libogdi4.1_4.1.1+ds-5_armhf.deb ... 198s Unpacking libogdi4.1:armhf (4.1.1+ds-5) ... 198s Selecting previously unselected package libopenjp2-7:armhf. 198s Preparing to unpack .../114-libopenjp2-7_2.5.4-1_armhf.deb ... 198s Unpacking libopenjp2-7:armhf (2.5.4-1) ... 198s Selecting previously unselected package libgpgmepp6t64:armhf. 198s Preparing to unpack .../115-libgpgmepp6t64_1.24.2-3ubuntu2_armhf.deb ... 198s Unpacking libgpgmepp6t64:armhf (1.24.2-3ubuntu2) ... 198s Selecting previously unselected package liblcms2-2:armhf. 198s Preparing to unpack .../116-liblcms2-2_2.17-1_armhf.deb ... 198s Unpacking liblcms2-2:armhf (2.17-1) ... 198s Selecting previously unselected package libpoppler147:armhf. 198s Preparing to unpack .../117-libpoppler147_25.03.0-11.1_armhf.deb ... 198s Unpacking libpoppler147:armhf (25.03.0-11.1) ... 198s Selecting previously unselected package libpq5:armhf. 198s Preparing to unpack .../118-libpq5_18.1-2_armhf.deb ... 198s Unpacking libpq5:armhf (18.1-2) ... 198s Selecting previously unselected package libqhull-r8.0:armhf. 198s Preparing to unpack .../119-libqhull-r8.0_2020.2-8_armhf.deb ... 198s Unpacking libqhull-r8.0:armhf (2020.2-8) ... 198s Selecting previously unselected package librttopo1:armhf. 198s Preparing to unpack .../120-librttopo1_1.1.0-4_armhf.deb ... 198s Unpacking librttopo1:armhf (1.1.0-4) ... 198s Selecting previously unselected package libspatialite8t64:armhf. 198s Preparing to unpack .../121-libspatialite8t64_5.1.0-3ubuntu1_armhf.deb ... 198s Unpacking libspatialite8t64:armhf (5.1.0-3ubuntu1) ... 198s Selecting previously unselected package libxerces-c3.2t64:armhf. 198s Preparing to unpack .../122-libxerces-c3.2t64_3.2.4+debian-1.3build2_armhf.deb ... 198s Unpacking libxerces-c3.2t64:armhf (3.2.4+debian-1.3build2) ... 199s Selecting previously unselected package libgdal36:armhf. 199s Preparing to unpack .../123-libgdal36_3.10.3+dfsg-1build3_armhf.deb ... 199s Unpacking libgdal36:armhf (3.10.3+dfsg-1build3) ... 199s Selecting previously unselected package libjson-perl. 199s Preparing to unpack .../124-libjson-perl_4.10000-1_all.deb ... 199s Unpacking libjson-perl (4.10000-1) ... 199s Selecting previously unselected package liblua5.4-0:armhf. 199s Preparing to unpack .../125-liblua5.4-0_5.4.8-1_armhf.deb ... 199s Unpacking liblua5.4-0:armhf (5.4.8-1) ... 199s Selecting previously unselected package libnorm1t64:armhf. 199s Preparing to unpack .../126-libnorm1t64_1.5.9+dfsg-4_armhf.deb ... 199s Unpacking libnorm1t64:armhf (1.5.9+dfsg-4) ... 199s Selecting previously unselected package libpgm-5.3-0t64:armhf. 199s Preparing to unpack .../127-libpgm-5.3-0t64_5.3.128~dfsg-2.1build2_armhf.deb ... 199s Unpacking libpgm-5.3-0t64:armhf (5.3.128~dfsg-2.1build2) ... 199s Selecting previously unselected package libsodium23:armhf. 199s Preparing to unpack .../128-libsodium23_1.0.18-2_armhf.deb ... 199s Unpacking libsodium23:armhf (1.0.18-2) ... 199s Selecting previously unselected package libzmq5:armhf. 199s Preparing to unpack .../129-libzmq5_4.3.5-1build3_armhf.deb ... 199s Unpacking libzmq5:armhf (4.3.5-1build3) ... 199s Selecting previously unselected package node-fortawesome-fontawesome-free. 199s Preparing to unpack .../130-node-fortawesome-fontawesome-free_6.7.2+ds1-1_all.deb ... 199s Unpacking node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 200s Selecting previously unselected package pandoc-data. 200s Preparing to unpack .../131-pandoc-data_3.1.11.1-3build1_all.deb ... 200s Unpacking pandoc-data (3.1.11.1-3build1) ... 200s Selecting previously unselected package pandoc. 200s Preparing to unpack .../132-pandoc_3.1.11.1+ds-4_armhf.deb ... 200s Unpacking pandoc (3.1.11.1+ds-4) ... 202s Selecting previously unselected package pybuild-plugin-autopkgtest. 202s Preparing to unpack .../133-pybuild-plugin-autopkgtest_7.20251231_all.deb ... 202s Unpacking pybuild-plugin-autopkgtest (7.20251231) ... 202s Selecting previously unselected package python3-pyproject-hooks. 202s Preparing to unpack .../134-python3-pyproject-hooks_1.2.0-1_all.deb ... 202s Unpacking python3-pyproject-hooks (1.2.0-1) ... 202s Selecting previously unselected package python3-wheel. 202s Preparing to unpack .../135-python3-wheel_0.46.1-2_all.deb ... 202s Unpacking python3-wheel (0.46.1-2) ... 202s Selecting previously unselected package python3-build. 202s Preparing to unpack .../136-python3-build_1.2.2-5_all.deb ... 202s Unpacking python3-build (1.2.2-5) ... 202s Selecting previously unselected package python3-installer. 202s Preparing to unpack .../137-python3-installer_0.7.0+dfsg1-3_all.deb ... 202s Unpacking python3-installer (0.7.0+dfsg1-3) ... 202s Selecting previously unselected package pybuild-plugin-pyproject. 202s Preparing to unpack .../138-pybuild-plugin-pyproject_7.20251231_all.deb ... 202s Unpacking pybuild-plugin-pyproject (7.20251231) ... 202s Selecting previously unselected package python-pystac-doc. 202s Preparing to unpack .../139-python-pystac-doc_1.14.3-1_all.deb ... 202s Unpacking python-pystac-doc (1.14.3-1) ... 202s Selecting previously unselected package python-tinycss2-common. 202s Preparing to unpack .../140-python-tinycss2-common_1.5.1-1_all.deb ... 202s Unpacking python-tinycss2-common (1.5.1-1) ... 202s Selecting previously unselected package python3-accessible-pygments. 202s Preparing to unpack .../141-python3-accessible-pygments_0.0.5-2build1_all.deb ... 202s Unpacking python3-accessible-pygments (0.0.5-2build1) ... 202s Selecting previously unselected package python3-affine. 202s Preparing to unpack .../142-python3-affine_2.4.0-2_all.deb ... 202s Unpacking python3-affine (2.4.0-2) ... 202s Selecting previously unselected package python3-all. 202s Preparing to unpack .../143-python3-all_3.14.2-1_armhf.deb ... 202s Unpacking python3-all (3.14.2-1) ... 202s Selecting previously unselected package python3-sniffio. 202s Preparing to unpack .../144-python3-sniffio_1.3.1-1_all.deb ... 202s Unpacking python3-sniffio (1.3.1-1) ... 202s Selecting previously unselected package python3-anyio. 202s Preparing to unpack .../145-python3-anyio_4.11.0-3_all.deb ... 202s Unpacking python3-anyio (4.11.0-3) ... 202s Selecting previously unselected package python3-astroid. 202s Preparing to unpack .../146-python3-astroid_4.0.2-1ubuntu1_all.deb ... 202s Unpacking python3-astroid (4.0.2-1ubuntu1) ... 203s Selecting previously unselected package python3-asttokens. 203s Preparing to unpack .../147-python3-asttokens_3.0.1-1_all.deb ... 203s Unpacking python3-asttokens (3.0.1-1) ... 203s Selecting previously unselected package python3-webencodings. 203s Preparing to unpack .../148-python3-webencodings_0.5.1-5build1_all.deb ... 203s Unpacking python3-webencodings (0.5.1-5build1) ... 203s Selecting previously unselected package python3-html5lib. 203s Preparing to unpack .../149-python3-html5lib_1.2-3_all.deb ... 203s Unpacking python3-html5lib (1.2-3) ... 203s Selecting previously unselected package python3-bleach. 203s Preparing to unpack .../150-python3-bleach_6.3.0-1_all.deb ... 203s Unpacking python3-bleach (6.3.0-1) ... 203s Selecting previously unselected package python3-soupsieve. 203s Preparing to unpack .../151-python3-soupsieve_2.8.1-1_all.deb ... 203s Unpacking python3-soupsieve (2.8.1-1) ... 203s Selecting previously unselected package python3-bs4. 203s Preparing to unpack .../152-python3-bs4_4.14.3-2build1_all.deb ... 203s Unpacking python3-bs4 (4.14.3-2build1) ... 203s Selecting previously unselected package python3-click. 203s Preparing to unpack .../153-python3-click_8.2.0+0.really.8.1.8-1build1_all.deb ... 203s Unpacking python3-click (8.2.0+0.really.8.1.8-1build1) ... 203s Selecting previously unselected package python3-click-plugins. 203s Preparing to unpack .../154-python3-click-plugins_1.1.1-5_all.deb ... 203s Unpacking python3-click-plugins (1.1.1-5) ... 203s Selecting previously unselected package python3-cligj. 203s Preparing to unpack .../155-python3-cligj_0.7.2-3_all.deb ... 203s Unpacking python3-cligj (0.7.2-3) ... 203s Selecting previously unselected package python3-colorama. 203s Preparing to unpack .../156-python3-colorama_0.4.6-4build1_all.deb ... 203s Unpacking python3-colorama (0.4.6-4build1) ... 203s Selecting previously unselected package python3-decorator. 203s Preparing to unpack .../157-python3-decorator_5.2.1-2_all.deb ... 203s Unpacking python3-decorator (5.2.1-2) ... 203s Selecting previously unselected package python3-defusedxml. 203s Preparing to unpack .../158-python3-defusedxml_0.7.1-3build1_all.deb ... 203s Unpacking python3-defusedxml (0.7.1-3build1) ... 203s Selecting previously unselected package python3-roman-numerals. 203s Preparing to unpack .../159-python3-roman-numerals_4.1.0-1_all.deb ... 203s Unpacking python3-roman-numerals (4.1.0-1) ... 203s Selecting previously unselected package python3-docutils. 203s Preparing to unpack .../160-python3-docutils_0.22.4+dfsg-1_all.deb ... 203s Unpacking python3-docutils (0.22.4+dfsg-1) ... 203s Selecting previously unselected package python3-executing. 203s Preparing to unpack .../161-python3-executing_2.2.1-0.1_all.deb ... 203s Unpacking python3-executing (2.2.1-0.1) ... 203s Selecting previously unselected package python3-fastjsonschema. 203s Preparing to unpack .../162-python3-fastjsonschema_2.21.1-1_all.deb ... 203s Unpacking python3-fastjsonschema (2.21.1-1) ... 203s Selecting previously unselected package python3-h11. 203s Preparing to unpack .../163-python3-h11_0.14.0-1.1_all.deb ... 203s Unpacking python3-h11 (0.14.0-1.1) ... 204s Selecting previously unselected package python3-imagesize. 204s Preparing to unpack .../164-python3-imagesize_1.4.1-1build1_all.deb ... 204s Unpacking python3-imagesize (1.4.1-1build1) ... 204s Selecting previously unselected package python3-iniconfig. 204s Preparing to unpack .../165-python3-iniconfig_2.1.0-2_all.deb ... 204s Unpacking python3-iniconfig (2.1.0-2) ... 204s Selecting previously unselected package python3-parso. 204s Preparing to unpack .../166-python3-parso_0.8.5-1_all.deb ... 204s Unpacking python3-parso (0.8.5-1) ... 204s Selecting previously unselected package python3-typeshed. 204s Preparing to unpack .../167-python3-typeshed_0.0~git20241223.ea91db2-4_all.deb ... 204s Unpacking python3-typeshed (0.0~git20241223.ea91db2-4) ... 205s Selecting previously unselected package python3-jedi. 205s Preparing to unpack .../168-python3-jedi_0.19.1+ds1-1build1_all.deb ... 205s Unpacking python3-jedi (0.19.1+ds1-1build1) ... 205s Selecting previously unselected package python3-traitlets. 205s Preparing to unpack .../169-python3-traitlets_5.14.3+really5.14.3-2_all.deb ... 205s Unpacking python3-traitlets (5.14.3+really5.14.3-2) ... 205s Selecting previously unselected package python3-matplotlib-inline. 205s Preparing to unpack .../170-python3-matplotlib-inline_0.2.1-1_all.deb ... 205s Unpacking python3-matplotlib-inline (0.2.1-1) ... 205s Selecting previously unselected package python3-wcwidth. 205s Preparing to unpack .../171-python3-wcwidth_0.2.14+dfsg1-1build1_all.deb ... 205s Unpacking python3-wcwidth (0.2.14+dfsg1-1build1) ... 205s Selecting previously unselected package python3-prompt-toolkit. 205s Preparing to unpack .../172-python3-prompt-toolkit_3.0.52-2_all.deb ... 205s Unpacking python3-prompt-toolkit (3.0.52-2) ... 205s Selecting previously unselected package python3-pure-eval. 205s Preparing to unpack .../173-python3-pure-eval_0.2.3-1_all.deb ... 205s Unpacking python3-pure-eval (0.2.3-1) ... 205s Selecting previously unselected package python3-stack-data. 205s Preparing to unpack .../174-python3-stack-data_0.6.3-3_all.deb ... 205s Unpacking python3-stack-data (0.6.3-3) ... 205s Selecting previously unselected package python3-ipython. 206s Preparing to unpack .../175-python3-ipython_8.35.0-2_all.deb ... 206s Unpacking python3-ipython (8.35.0-2) ... 206s Selecting previously unselected package python3-platformdirs. 206s Preparing to unpack .../176-python3-platformdirs_4.5.1-1_all.deb ... 206s Unpacking python3-platformdirs (4.5.1-1) ... 206s Selecting previously unselected package python3-jupyter-core. 206s Preparing to unpack .../177-python3-jupyter-core_5.9.1-1_all.deb ... 206s Unpacking python3-jupyter-core (5.9.1-1) ... 206s Selecting previously unselected package python3-psutil. 206s Preparing to unpack .../178-python3-psutil_7.1.0-1ubuntu1_armhf.deb ... 206s Unpacking python3-psutil (7.1.0-1ubuntu1) ... 206s Selecting previously unselected package python3-tornado. 206s Preparing to unpack .../179-python3-tornado_6.5.4-0.1_armhf.deb ... 206s Unpacking python3-tornado (6.5.4-0.1) ... 206s Selecting previously unselected package python3-zmq. 206s Preparing to unpack .../180-python3-zmq_27.1.0-1_armhf.deb ... 206s Unpacking python3-zmq (27.1.0-1) ... 206s Selecting previously unselected package python3-jupyter-client. 206s Preparing to unpack .../181-python3-jupyter-client_8.7.0-1_all.deb ... 206s Unpacking python3-jupyter-client (8.7.0-1) ... 206s Selecting previously unselected package python3-jupyterlab-pygments. 206s Preparing to unpack .../182-python3-jupyterlab-pygments_0.2.2-3build1_all.deb ... 206s Unpacking python3-jupyterlab-pygments (0.2.2-3build1) ... 206s Selecting previously unselected package python3-livereload. 206s Preparing to unpack .../183-python3-livereload_2.7.1-0.1_all.deb ... 206s Unpacking python3-livereload (2.7.1-0.1) ... 206s Selecting previously unselected package python3-mistune. 206s Preparing to unpack .../184-python3-mistune_3.1.4-1_all.deb ... 206s Unpacking python3-mistune (3.1.4-1) ... 206s Selecting previously unselected package python3-multidict. 206s Preparing to unpack .../185-python3-multidict_6.4.3-1build1_armhf.deb ... 206s Unpacking python3-multidict (6.4.3-1build1) ... 206s Selecting previously unselected package python3-nbformat. 206s Preparing to unpack .../186-python3-nbformat_5.10.4-1_all.deb ... 206s Unpacking python3-nbformat (5.10.4-1) ... 206s Selecting previously unselected package python3-nbclient. 206s Preparing to unpack .../187-python3-nbclient_0.10.4-1_all.deb ... 206s Unpacking python3-nbclient (0.10.4-1) ... 206s Selecting previously unselected package python3-tinycss2. 206s Preparing to unpack .../188-python3-tinycss2_1.5.1-1_all.deb ... 206s Unpacking python3-tinycss2 (1.5.1-1) ... 206s Selecting previously unselected package python3-pandocfilters. 206s Preparing to unpack .../189-python3-pandocfilters_1.5.1-1_all.deb ... 206s Unpacking python3-pandocfilters (1.5.1-1) ... 207s Selecting previously unselected package python3-nbconvert. 207s Preparing to unpack .../190-python3-nbconvert_7.16.6-1_all.deb ... 207s Unpacking python3-nbconvert (7.16.6-1) ... 207s Selecting previously unselected package sphinx-common. 207s Preparing to unpack .../191-sphinx-common_8.2.3-12_all.deb ... 207s Unpacking sphinx-common (8.2.3-12) ... 207s Selecting previously unselected package python3-alabaster. 207s Preparing to unpack .../192-python3-alabaster_0.7.16-0.1build1_all.deb ... 207s Unpacking python3-alabaster (0.7.16-0.1build1) ... 207s Selecting previously unselected package python3-snowballstemmer. 207s Preparing to unpack .../193-python3-snowballstemmer_3.0.1-1_all.deb ... 207s Unpacking python3-snowballstemmer (3.0.1-1) ... 207s Selecting previously unselected package python3-sphinx. 207s Preparing to unpack .../194-python3-sphinx_8.2.3-12_all.deb ... 207s Unpacking python3-sphinx (8.2.3-12) ... 207s Selecting previously unselected package python3-nbsphinx. 207s Preparing to unpack .../195-python3-nbsphinx_0.9.5+ds-1_all.deb ... 207s Unpacking python3-nbsphinx (0.9.5+ds-1) ... 207s Selecting previously unselected package python3-pluggy. 207s Preparing to unpack .../196-python3-pluggy_1.6.0-2_all.deb ... 207s Unpacking python3-pluggy (1.6.0-2) ... 207s Selecting previously unselected package python3-propcache. 207s Preparing to unpack .../197-python3-propcache_0.3.1-1build1_armhf.deb ... 207s Unpacking python3-propcache (0.3.1-1build1) ... 207s Selecting previously unselected package python3-pydata-sphinx-theme. 207s Preparing to unpack .../198-python3-pydata-sphinx-theme_0.16.1+dfsg-5_all.deb ... 207s Unpacking python3-pydata-sphinx-theme (0.16.1+dfsg-5) ... 207s Selecting previously unselected package python3-pystac. 207s Preparing to unpack .../199-python3-pystac_1.14.3-1_all.deb ... 207s Unpacking python3-pystac (1.14.3-1) ... 207s Selecting previously unselected package python3-pytest. 207s Preparing to unpack .../200-python3-pytest_9.0.2-2_all.deb ... 207s Unpacking python3-pytest (9.0.2-2) ... 207s Selecting previously unselected package python3-pytest-mock. 207s Preparing to unpack .../201-python3-pytest-mock_3.15.1-1_all.deb ... 207s Unpacking python3-pytest-mock (3.15.1-1) ... 207s Selecting previously unselected package python3-wrapt. 207s Preparing to unpack .../202-python3-wrapt_1.17.3-3_armhf.deb ... 207s Unpacking python3-wrapt (1.17.3-3) ... 208s Selecting previously unselected package python3-yarl. 208s Preparing to unpack .../203-python3-yarl_1.22.0-1_armhf.deb ... 208s Unpacking python3-yarl (1.22.0-1) ... 208s Selecting previously unselected package python3-vcr. 208s Preparing to unpack .../204-python3-vcr_7.0.0-2_all.deb ... 208s Unpacking python3-vcr (7.0.0-2) ... 208s Selecting previously unselected package python3-pytest-recording. 208s Preparing to unpack .../205-python3-pytest-recording_0.13.4-1_all.deb ... 208s Unpacking python3-pytest-recording (0.13.4-1) ... 208s Selecting previously unselected package python3-rasterio. 208s Preparing to unpack .../206-python3-rasterio_1.4.3-2build2_armhf.deb ... 208s Unpacking python3-rasterio (1.4.3-2build2) ... 208s Selecting previously unselected package python3-requests-mock. 208s Preparing to unpack .../207-python3-requests-mock_1.12.1-4_all.deb ... 208s Unpacking python3-requests-mock (1.12.1-4) ... 208s Selecting previously unselected package python3-shapely. 208s Preparing to unpack .../208-python3-shapely_2.1.2-1ubuntu1_armhf.deb ... 208s Unpacking python3-shapely (2.1.2-1ubuntu1) ... 208s Selecting previously unselected package python3-starlette. 208s Preparing to unpack .../209-python3-starlette_0.50.0-1_all.deb ... 208s Unpacking python3-starlette (0.50.0-1) ... 208s Selecting previously unselected package python3-uvloop. 208s Preparing to unpack .../210-python3-uvloop_0.22.1+ds1-2_armhf.deb ... 208s Unpacking python3-uvloop (0.22.1+ds1-2) ... 208s Selecting previously unselected package python3-wsproto. 208s Preparing to unpack .../211-python3-wsproto_1.3.2-1_all.deb ... 208s Unpacking python3-wsproto (1.3.2-1) ... 208s Selecting previously unselected package python3-uvicorn. 208s Preparing to unpack .../212-python3-uvicorn_0.38.0-1_all.deb ... 208s Unpacking python3-uvicorn (0.38.0-1) ... 208s Selecting previously unselected package python3-watchfiles. 208s Preparing to unpack .../213-python3-watchfiles_1.1.1-2_armhf.deb ... 208s Unpacking python3-watchfiles (1.1.1-2) ... 208s Selecting previously unselected package python3-websockets. 208s Preparing to unpack .../214-python3-websockets_15.0.1-1build1_armhf.deb ... 208s Unpacking python3-websockets (15.0.1-1build1) ... 208s Selecting previously unselected package python3-sphinx-autobuild. 209s Preparing to unpack .../215-python3-sphinx-autobuild_2025.08.25-1_all.deb ... 209s Unpacking python3-sphinx-autobuild (2025.08.25-1) ... 209s Selecting previously unselected package python3-sphinx-design. 209s Preparing to unpack .../216-python3-sphinx-design_0.6.1-2_all.deb ... 209s Unpacking python3-sphinx-design (0.6.1-2) ... 209s Selecting previously unselected package libjs-mathjax. 209s Preparing to unpack .../217-libjs-mathjax_2.7.9+dfsg-1build1_all.deb ... 209s Unpacking libjs-mathjax (2.7.9+dfsg-1build1) ... 210s Setting up dh-python (7.20251231) ... 210s Setting up liblcms2-2:armhf (2.17-1) ... 210s Setting up python3-iniconfig (2.1.0-2) ... 210s Setting up python3-sniffio (1.3.1-1) ... 211s Setting up python3-tornado (6.5.4-0.1) ... 212s Setting up libnorm1t64:armhf (1.5.9+dfsg-4) ... 212s Setting up libsharpyuv0:armhf (1.5.0-0.1build1) ... 212s Setting up libgpgmepp6t64:armhf (1.24.2-3ubuntu2) ... 212s Setting up libaom3:armhf (3.13.1-2) ... 212s Setting up mysql-common (5.8+1.1.1ubuntu2) ... 212s update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode 212s Setting up python3-pure-eval (0.2.3-1) ... 212s Setting up fonts-mathjax (2.7.9+dfsg-1build1) ... 212s Setting up libsodium23:armhf (1.0.18-2) ... 212s Setting up liblerc4:armhf (4.0.0+ds-5ubuntu2) ... 212s Setting up proj-data (9.7.1-1) ... 212s Setting up python-pystac-doc (1.14.3-1) ... 212s Setting up libjs-mathjax (2.7.9+dfsg-1build1) ... 212s Setting up python3-anyio (4.11.0-3) ... 213s Setting up python3-parso (0.8.5-1) ... 214s Setting up libogdi4.1:armhf (4.1.1+ds-5) ... 214s Setting up python3-colorama (0.4.6-4build1) ... 214s Setting up python3-defusedxml (0.7.1-3build1) ... 214s Setting up libarchive-zip-perl (1.68-1) ... 214s Setting up python3-alabaster (0.7.16-0.1build1) ... 215s Setting up libdebhelper-perl (13.28ubuntu1) ... 215s Setting up libpq5:armhf (18.1-2) ... 215s Setting up libdeflate0:armhf (1.23-2) ... 215s Setting up linux-libc-dev:armhf (6.18.0-9.9) ... 215s Setting up m4 (1.4.20-2) ... 215s Setting up python3-watchfiles (1.1.1-2) ... 215s Setting up libqhull-r8.0:armhf (2020.2-8) ... 215s Setting up node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 215s Setting up python3-starlette (0.50.0-1) ... 216s Setting up python3-pandocfilters (1.5.1-1) ... 216s Setting up libxerces-c3.2t64:armhf (3.2.4+debian-1.3build2) ... 216s Setting up libgomp1:armhf (15.2.0-11ubuntu1) ... 216s Setting up python3-click (8.2.0+0.really.8.1.8-1build1) ... 216s Setting up libabsl20240722:armhf (20240722.0-4ubuntu1) ... 216s Setting up libmysqlclient24:armhf (8.4.7-0ubuntu3) ... 216s Setting up python3-wheel (0.46.1-2) ... 217s Setting up libjbig0:armhf (2.1-6.1ubuntu3) ... 217s Setting up python3-webencodings (0.5.1-5build1) ... 217s Setting up libaec0:armhf (1.1.4-2) ... 217s Setting up python3-platformdirs (4.5.1-1) ... 217s Setting up python3-psutil (7.1.0-1ubuntu1) ... 218s Setting up gdal-data (3.12.1+dfsg-1) ... 218s Setting up python3-multidict (6.4.3-1build1) ... 219s Setting up libsnappy1v5:armhf (1.2.2-2) ... 219s Setting up libdw1t64:armhf (0.194-1) ... 219s Setting up python3-jupyterlab-pygments (0.2.2-3build1) ... 219s Setting up libpython3.13-minimal:armhf (3.13.11-1) ... 219s Setting up libpgm-5.3-0t64:armhf (5.3.128~dfsg-2.1build2) ... 219s Setting up python3-decorator (5.2.1-2) ... 219s Setting up autotools-dev (20240727.1) ... 219s Setting up libblas3:armhf (3.12.1-7ubuntu1) ... 219s update-alternatives: using /usr/lib/arm-linux-gnueabihf/blas/libblas.so.3 to provide /usr/lib/arm-linux-gnueabihf/libblas.so.3 (libblas.so.3-arm-linux-gnueabihf) in auto mode 219s Setting up rpcsvc-proto (1.4.3-1) ... 219s Setting up libcfitsio10t64:armhf (4.6.3-1) ... 219s Setting up python3-wcwidth (0.2.14+dfsg1-1build1) ... 220s Setting up python3-pyproject-hooks (1.2.0-1) ... 220s Setting up libfreetype6:armhf (2.14.1+dfsg-2) ... 220s Setting up python3-accessible-pygments (0.0.5-2build1) ... 220s Setting up python3-typeshed (0.0~git20241223.ea91db2-4) ... 220s Setting up python3-snowballstemmer (3.0.1-1) ... 221s Setting up python3-requests-mock (1.12.1-4) ... 222s Setting up fonts-dejavu-mono (2.37-8build1) ... 222s Setting up libmpc3:armhf (1.3.1-2) ... 222s Setting up python3-numpy-dev:armhf (1:2.3.5+ds-3) ... 222s Setting up python3-wrapt (1.17.3-3) ... 222s Setting up python3-h11 (0.14.0-1.1) ... 223s Setting up autopoint (0.23.2-1) ... 223s Setting up python3-click-plugins (1.1.1-5) ... 223s Setting up fonts-dejavu-core (2.37-8build1) ... 223s Setting up unixodbc-common (2.3.14-1) ... 223s Setting up libjpeg-turbo8:armhf (2.1.5-4ubuntu2) ... 223s Setting up python3-html5lib (1.2-3) ... 224s Setting up libltdl7:armhf (2.5.4-9) ... 224s Setting up python3-uvloop (0.22.1+ds1-2) ... 224s Setting up python3-installer (0.7.0+dfsg1-3) ... 224s Setting up libgfortran5:armhf (15.2.0-11ubuntu1) ... 224s Setting up autoconf (2.72-3.1ubuntu1) ... 224s Setting up python3-pluggy (1.6.0-2) ... 225s Setting up libwebp7:armhf (1.5.0-0.1build1) ... 225s Setting up libubsan1:armhf (15.2.0-11ubuntu1) ... 225s Setting up python3-fastjsonschema (2.21.1-1) ... 225s Setting up libgif7:armhf (5.2.2-1ubuntu3) ... 225s Setting up libodbc2:armhf (2.3.14-1) ... 225s Setting up libgav1-2:armhf (0.20.0-2) ... 225s Setting up libgeos3.14.1:armhf (3.14.1-2) ... 225s Setting up liburiparser1:armhf (0.9.8+dfsg-2) ... 225s Setting up libfyba0t64:armhf (4.1.1-11build2) ... 225s Setting up dwz (0.16-2) ... 225s Setting up libdav1d7:armhf (1.5.3-1) ... 225s Setting up libminizip1t64:armhf (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 225s Setting up python3-astroid (4.0.2-1ubuntu1) ... 226s Setting up python3-livereload (2.7.1-0.1) ... 227s Setting up python3-propcache (0.3.1-1build1) ... 227s Setting up libcrypt-dev:armhf (1:4.5.1-1) ... 227s Setting up python3-traitlets (5.14.3+really5.14.3-2) ... 228s Setting up libasan8:armhf (15.2.0-11ubuntu1) ... 228s Setting up python-tinycss2-common (1.5.1-1) ... 228s Setting up libjson-perl (4.10000-1) ... 228s Setting up libblosc1:armhf (1.21.5+ds-2) ... 228s Setting up debugedit (1:5.2-3) ... 228s Setting up python3-roman-numerals (4.1.0-1) ... 228s Setting up liblua5.4-0:armhf (5.4.8-1) ... 228s Setting up libopenjp2-7:armhf (2.5.4-1) ... 228s Setting up python3.13-minimal (3.13.11-1) ... 229s Setting up sgml-base (1.31+nmu1) ... 229s Setting up pandoc-data (3.1.11.1-3build1) ... 229s Setting up libisl23:armhf (0.27-1build1) ... 229s Setting up python3-affine (2.4.0-2) ... 230s Setting up python3-build (1.2.2-5) ... 230s Setting up libde265-0:armhf (1.0.16-1build1) ... 230s Setting up libc-dev-bin (2.42-2ubuntu4) ... 230s Setting up libkmlbase1t64:armhf (1.3.0-13) ... 230s Setting up cpp-15-arm-linux-gnueabihf (15.2.0-11ubuntu1) ... 230s Setting up python3-yarl (1.22.0-1) ... 231s Setting up python3-mistune (3.1.4-1) ... 231s Setting up libpython3.13-stdlib:armhf (3.13.11-1) ... 231s Setting up python3-soupsieve (2.8.1-1) ... 232s Setting up libcc1-0:armhf (15.2.0-11ubuntu1) ... 232s Setting up python3-jupyter-core (5.9.1-1) ... 232s Setting up cpp-arm-linux-gnueabihf (4:15.2.0-4ubuntu1) ... 232s Setting up libsz2:armhf (1.1.4-2) ... 232s Setting up python3-imagesize (1.4.1-1build1) ... 232s Setting up gdal-plugins:armhf (3.12.1+dfsg-1) ... 232s Setting up python3-websockets (15.0.1-1build1) ... 233s Setting up python3-pystac (1.14.3-1) ... 234s Setting up libjpeg8:armhf (8c-2ubuntu11) ... 234s Setting up automake (1:1.18.1-3build1) ... 234s update-alternatives: using /usr/bin/automake-1.18 to provide /usr/bin/automake (automake) in auto mode 234s Setting up python3-prompt-toolkit (3.0.52-2) ... 235s Setting up libfile-stripnondeterminism-perl (1.15.0-1build1) ... 235s Setting up libodbcinst2:armhf (2.3.14-1) ... 235s Setting up liblapack3:armhf (3.12.1-7ubuntu1) ... 235s update-alternatives: using /usr/lib/arm-linux-gnueabihf/lapack/liblapack.so.3 to provide /usr/lib/arm-linux-gnueabihf/liblapack.so.3 (liblapack.so.3-arm-linux-gnueabihf) in auto mode 235s Setting up gettext (0.23.2-1) ... 235s Setting up libarpack2t64:armhf (3.9.1-6) ... 235s Setting up python3-tinycss2 (1.5.1-1) ... 236s Setting up libgcc-15-dev:armhf (15.2.0-11ubuntu1) ... 236s Setting up libzmq5:armhf (4.3.5-1build3) ... 236s Setting up python3-wsproto (1.3.2-1) ... 236s Setting up gcc-15-arm-linux-gnueabihf (15.2.0-11ubuntu1) ... 236s Setting up python3-jedi (0.19.1+ds1-1build1) ... 237s Setting up python3.13 (3.13.11-1) ... 239s Setting up python3-asttokens (3.0.1-1) ... 239s Setting up pybuild-plugin-pyproject (7.20251231) ... 239s Setting up fontconfig-config (2.15.0-2.4ubuntu1) ... 240s Setting up python3-pytest (9.0.2-2) ... 241s Setting up libgeos-c1t64:armhf (3.14.1-2) ... 241s Setting up python3-cligj (0.7.2-3) ... 241s Setting up python3-all (3.14.2-1) ... 241s Setting up python3-nbformat (5.10.4-1) ... 242s Setting up python3-bs4 (4.14.3-2build1) ... 242s Setting up intltool-debian (0.35.0+20060710.6build1) ... 242s Setting up python3-bleach (6.3.0-1) ... 243s Setting up python3-matplotlib-inline (0.2.1-1) ... 243s Setting up libkmldom1t64:armhf (1.3.0-13) ... 243s Setting up pandoc (3.1.11.1+ds-4) ... 243s Setting up python3-executing (2.2.1-0.1) ... 244s Setting up python3-zmq (27.1.0-1) ... 244s Setting up sphinx-common (8.2.3-12) ... 244s Setting up python3-vcr (7.0.0-2) ... 245s Setting up python3-numpy (1:2.3.5+ds-3) ... 251s Setting up libhdf4-0-alt:armhf (4.3.0-1) ... 251s Setting up dh-strip-nondeterminism (1.15.0-1build1) ... 251s Setting up librttopo1:armhf (1.1.0-4) ... 251s Setting up libhdf5-310:armhf (1.14.5+repack-4) ... 251s Setting up libfreexl1:armhf (2.0.0-1build3) ... 251s Setting up python3-pytest-mock (3.15.1-1) ... 251s Setting up cpp-15 (15.2.0-11ubuntu1) ... 251s Setting up libtiff6:armhf (4.7.0-3ubuntu3) ... 251s Setting up cpp (4:15.2.0-4ubuntu1) ... 251s Setting up xml-core (0.19build1) ... 252s Setting up libc6-dev:armhf (2.42-2ubuntu4) ... 252s Setting up python3-jupyter-client (8.7.0-1) ... 252s Setting up libarmadillo14 (1:14.2.3+dfsg-1) ... 252s Setting up libfontconfig1:armhf (2.15.0-2.4ubuntu1) ... 252s Setting up libyuv0:armhf (0.0.1922.20260106-1) ... 252s Setting up python3-stack-data (0.6.3-3) ... 253s Setting up gcc-arm-linux-gnueabihf (4:15.2.0-4ubuntu1) ... 253s Setting up python3-pytest-recording (0.13.4-1) ... 253s Setting up libhdf5-hl-310:armhf (1.14.5+repack-4) ... 253s Setting up libavif16:armhf (1.3.0-1ubuntu3) ... 253s Setting up python3-shapely (2.1.2-1ubuntu1) ... 254s Setting up python3-uvicorn (0.38.0-1) ... 255s Setting up libpoppler147:armhf (25.03.0-11.1) ... 255s Setting up libproj25:armhf (9.7.1-1) ... 255s Setting up po-debconf (1.0.22) ... 255s Setting up libnetcdf22:armhf (1:4.9.3-1build1) ... 255s Setting up libkmlengine1t64:armhf (1.3.0-13) ... 255s Setting up libgeotiff5:armhf (1.7.4-1) ... 255s Setting up python3-nbclient (0.10.4-1) ... 255s Setting up gcc-15 (15.2.0-11ubuntu1) ... 255s Setting up libstdc++-15-dev:armhf (15.2.0-11ubuntu1) ... 255s Setting up python3-ipython (8.35.0-2) ... 256s /usr/lib/python3/dist-packages/IPython/core/interactiveshell.py:3141: SyntaxWarning: 'return' in a 'finally' block 256s return result 257s Setting up python3-nbconvert (7.16.6-1) ... 258s Setting up libspatialite8t64:armhf (5.1.0-3ubuntu1) ... 258s Setting up libtool (2.5.4-9) ... 258s Setting up g++-15-arm-linux-gnueabihf (15.2.0-11ubuntu1) ... 258s Setting up gcc (4:15.2.0-4ubuntu1) ... 258s Setting up dh-autoreconf (21) ... 258s Setting up g++-15 (15.2.0-11ubuntu1) ... 258s Setting up g++-arm-linux-gnueabihf (4:15.2.0-4ubuntu1) ... 258s Setting up debhelper (13.28ubuntu1) ... 258s Setting up g++ (4:15.2.0-4ubuntu1) ... 258s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 258s Setting up build-essential (12.12ubuntu2) ... 258s Setting up pybuild-plugin-autopkgtest (7.20251231) ... 258s Setting up libheif-plugin-aomdec:armhf (1.21.2-1) ... 258s Setting up libheif1:armhf (1.21.2-1) ... 258s Setting up libgdal36:armhf (3.10.3+dfsg-1build3) ... 258s Setting up libheif-plugin-libde265:armhf (1.21.2-1) ... 258s Setting up python3-rasterio (1.4.3-2build2) ... 259s Processing triggers for install-info (7.2-5) ... 259s Processing triggers for libc-bin (2.42-2ubuntu4) ... 259s Processing triggers for systemd (259-1ubuntu2) ... 259s Processing triggers for man-db (2.13.1-1) ... 261s Processing triggers for sgml-base (1.31+nmu1) ... 261s Setting up docutils-common (0.22.4+dfsg-1) ... 261s Processing triggers for sgml-base (1.31+nmu1) ... 261s Setting up python3-docutils (0.22.4+dfsg-1) ... 263s Setting up python3-sphinx (8.2.3-12) ... 265s Setting up python3-sphinx-autobuild (2025.08.25-1) ... 266s Setting up python3-sphinx-design (0.6.1-2) ... 266s Setting up python3-nbsphinx (0.9.5+ds-1) ... 266s Setting up python3-pydata-sphinx-theme (0.16.1+dfsg-5) ... 280s autopkgtest [20:17:33]: test pybuild-autopkgtest: pybuild-autopkgtest 280s autopkgtest [20:17:33]: test pybuild-autopkgtest: [----------------------- 282s pybuild-autopkgtest 283s I: pybuild base:384: cd /tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build; python3.13 -m pytest tests 288s ============================= test session starts ============================== 288s platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0 288s rootdir: /tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build 288s configfile: pyproject.toml 288s plugins: typeguard-4.4.4, anyio-4.11.0, mock-3.15.1, recording-0.13.4, requests_mock-1.12.1 288s collected 1557 items 288s 289s tests/extensions/test_classification.py .................... [ 1%] 289s tests/extensions/test_custom.py ....... [ 1%] 289s tests/extensions/test_datacube.py ................................. [ 3%] 290s tests/extensions/test_eo.py .......................................... [ 6%] 290s tests/extensions/test_ext.py ........................................... [ 9%] 290s ....... [ 9%] 290s tests/extensions/test_file.py ................................. [ 11%] 290s tests/extensions/test_grid.py ............ [ 12%] 291s tests/extensions/test_mgrs.py ................... [ 13%] 291s tests/extensions/test_mlm.py ........................................... [ 16%] 291s ... [ 16%] 291s tests/extensions/test_pointcloud.py ...................... [ 18%] 293s tests/extensions/test_projection.py ................................... [ 20%] 293s tests/extensions/test_raster.py ......... [ 21%] 293s tests/extensions/test_render.py .................. [ 22%] 293s tests/extensions/test_sar.py ...................... [ 23%] 293s tests/extensions/test_sat.py .......................... [ 25%] 294s tests/extensions/test_scientific.py .................................... [ 27%] 294s . [ 27%] 294s tests/extensions/test_storage.py ................... [ 28%] 294s tests/extensions/test_table.py ......... [ 29%] 294s tests/extensions/test_timestamps.py ................. [ 30%] 295s tests/extensions/test_version.py .............................. [ 32%] 295s tests/extensions/test_view.py ....................... [ 33%] 295s tests/extensions/test_xarray_assets.py ..................... [ 35%] 296s tests/html/test_html.py .......... [ 35%] 296s tests/posix_paths/test_posix_paths.py ...ss.ss [ 36%] 296s tests/serialization/test_identify.py ................................... [ 38%] 296s ........................................................................ [ 43%] 297s .......................... [ 45%] 297s tests/serialization/test_migrate.py .................................... [ 47%] 297s ........................................................................ [ 51%] 297s ......................... [ 53%] 298s tests/test_asset.py ...............ssss [ 54%] 298s tests/test_cache.py .... [ 55%] 298s tests/test_catalog.py .................................................. [ 58%] 304s ........................................................................ [ 62%] 304s ................... [ 64%] 305s tests/test_collection.py ............................................... [ 67%] 305s ...... [ 67%] 305s tests/test_common_metadata.py ...................... [ 68%] 305s tests/test_item.py ..................................................... [ 72%] 305s [ 72%] 305s tests/test_item_assets.py ............. [ 73%] 306s tests/test_item_collection.py .................. [ 74%] 306s tests/test_layout.py ............................................. [ 77%] 306s tests/test_link.py ........................................... [ 79%] 306s tests/test_pystac_client.py s. [ 80%] 306s tests/test_stac_io.py ................ [ 81%] 306s tests/test_summaries.py ........... [ 81%] 306s tests/test_utils.py ................................ssssssss..s......... [ 85%] 307s ............................................................... [ 89%] 307s tests/test_version.py .. [ 89%] 327s tests/test_writing.py ..................... [ 90%] 327s tests/validation/test_schema_uri_map.py . [ 90%] 336s tests/validation/test_validate.py ...................................... [ 93%] 341s ........................................................................ [ 97%] 356s .................................. [100%] 356s 356s ================= 1539 passed, 18 skipped in 69.66s (0:01:09) ================== 356s I: pybuild base:384: cd /tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build; python3.14 -m pytest tests 360s ============================= test session starts ============================== 360s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 360s rootdir: /tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build 360s configfile: pyproject.toml 360s plugins: typeguard-4.4.4, anyio-4.11.0, mock-3.15.1, recording-0.13.4, requests_mock-1.12.1 360s collected 1557 items 360s 361s tests/extensions/test_classification.py ......EE.....E...... [ 1%] 361s tests/extensions/test_custom.py ....... [ 1%] 362s tests/extensions/test_datacube.py .......................E..EE..... [ 3%] 363s tests/extensions/test_eo.py .....EE.EE...............EE............... [ 6%] 364s tests/extensions/test_ext.py ........................................... [ 9%] 364s ....... [ 9%] 366s tests/extensions/test_file.py .....EEE.....EEEEE.EEEEE.......EE [ 11%] 367s tests/extensions/test_grid.py ..E.E....... [ 12%] 368s tests/extensions/test_mgrs.py ........E...EEE.... [ 13%] 368s tests/extensions/test_mlm.py .........................E...E............. [ 16%] 368s ... [ 16%] 370s tests/extensions/test_pointcloud.py ..EEEEEEE............. [ 18%] 372s tests/extensions/test_projection.py ..EEE.EE.EEEEE.........E........... [ 20%] 372s tests/extensions/test_raster.py .EE...... [ 21%] 373s tests/extensions/test_render.py ................EE [ 22%] 373s tests/extensions/test_sar.py .EE................... [ 23%] 375s tests/extensions/test_sat.py ...EEEEEEEEE..EE.......... [ 25%] 379s tests/extensions/test_scientific.py ...EEEEEEEEEE...EEEEEEEEEE.......... [ 27%] 379s . [ 27%] 380s tests/extensions/test_storage.py ..E............EEEE [ 28%] 381s tests/extensions/test_table.py E........ [ 29%] 382s tests/extensions/test_timestamps.py ..EEEE........... [ 30%] 384s tests/extensions/test_version.py ...EEEEEEEE......EE.EE....EE.. [ 32%] 386s tests/extensions/test_view.py ..EEEEEE............... [ 33%] 386s tests/extensions/test_xarray_assets.py ...........EE....EE.. [ 35%] 387s tests/html/test_html.py .......... [ 35%] 387s tests/posix_paths/test_posix_paths.py ...ss.ss [ 36%] 387s tests/serialization/test_identify.py ................................... [ 38%] 387s ........................................................................ [ 43%] 387s .......................... [ 45%] 388s tests/serialization/test_migrate.py .................................... [ 47%] 388s ........................................................................ [ 51%] 388s ......................... [ 53%] 388s tests/test_asset.py ...............ssss [ 54%] 388s tests/test_cache.py .... [ 55%] 389s tests/test_catalog.py ........E......................................... [ 58%] 393s ...........................EEEEEEEE.................................EE.. [ 62%] 393s ................... [ 64%] 394s tests/test_collection.py ............................................... [ 67%] 394s ...... [ 67%] 394s tests/test_common_metadata.py ...................... [ 68%] 395s tests/test_item.py ..........E.E..E....E......................E......... [ 72%] 395s [ 72%] 395s tests/test_item_assets.py ............. [ 73%] 395s tests/test_item_collection.py .................. [ 74%] 395s tests/test_layout.py ............................................. [ 77%] 396s tests/test_link.py ........................................... [ 79%] 396s tests/test_pystac_client.py s. [ 80%] 396s tests/test_stac_io.py ...........EE.EE [ 81%] 397s tests/test_summaries.py ........... [ 81%] 397s tests/test_utils.py ................................ssssssss..s......... [ 85%] 398s ............................................................... [ 89%] 398s tests/test_version.py .. [ 89%] 402s tests/test_writing.py EEEEEEEEEEEEEEEEEEEEE [ 90%] 402s tests/validation/test_schema_uri_map.py . [ 90%] 410s tests/validation/test_validate.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 93%] 425s EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 97%] 431s EEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.... [100%] 431s 431s ==================================== ERRORS ==================================== 431s ____________________ ERROR at setup of test_apply_bitfields ____________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _____________________ ERROR at setup of test_apply_classes _____________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s ________________ ERROR at setup of test_validate_classification ________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _______________________ ERROR at setup of test_validate ________________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _____________________ ERROR at setup of test_set_variables _____________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s ____________________ ERROR at setup of test_set_dimensions _____________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s ______________________ ERROR at setup of test_validate_eo ______________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _________________________ ERROR at setup of test_bands _________________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s ______________________ ERROR at setup of test_asset_bands ______________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s ______________________ ERROR at setup of test_cloud_cover ______________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s ______________ ERROR at setup of test_set_field[cloud_cover-7.8] _______________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _______________ ERROR at setup of test_set_field[snow_cover-99] ________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _____________________ ERROR at setup of test_validate_item _____________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s __________________ ERROR at setup of test_validate_collection __________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s ___________________ ERROR at setup of test_validate_catalog ____________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _________ ERROR at setup of test_set_field_on_asset[thumbnail-size-1] __________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s ___ ERROR at setup of test_set_field_on_asset[measurement-header_size-8192] ____ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _ ERROR at setup of test_set_field_on_asset[thumbnail-checksum-90e40210163700a8a6501eccd00b6d3b44ddaed0] _ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _ ERROR at setup of test_set_field_on_asset[thumbnail-byte_order-little-endian] _ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _ ERROR at setup of test_set_field_on_asset[calibrations-local_path-different-file.xml] _ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _________ ERROR at setup of test_set_field_on_link[about-size-129302] __________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _______ ERROR at setup of test_set_field_on_link[about-header_size-4092] _______ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _ ERROR at setup of test_set_field_on_link[about-checksum-90e40210163700a8a6501eccd00b6d3b44ddaedb] _ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s ____ ERROR at setup of test_set_field_on_link[about-byte_order-big-endian] _____ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s ______ ERROR at setup of test_set_field_on_link[about-local_path-a/path] _______ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s __________________ ERROR at setup of test_migrate_from_v2_0_0 __________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s __________________ ERROR at setup of test_migrate_from_v1_0_0 __________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s ______________________ ERROR at setup of test_attributes _______________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_grid' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s ________________________ ERROR at setup of test_modify _________________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_grid' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _______________________ ERROR at setup of test_validate ________________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s ______________ ERROR at setup of test_set_field[latitude_band-C] _______________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _______________ ERROR at setup of test_set_field[grid_square-ZA] _______________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s ________________ ERROR at setup of test_set_field[utm_zone-59] _________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _________________________ ERROR at setup of test_apply _________________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_mlm' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _____________________ ERROR at setup of test_validate_mlm ______________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_mlm' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s __________________ ERROR at setup of test_validate_pointcloud __________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 431s # distribute, sublicense, and/or sell copies of the Software, and to 431s # permit persons to whom the Software is furnished to do so, subject to 431s # the following conditions: 431s # 431s # The above copyright notice and this permission notice shall be 431s # included in all copies or substantial portions of the Software. 431s # 431s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 431s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 431s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 431s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 431s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 431s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 431s # 431s 431s __doc__ = """ 431s pyparsing module - Classes and methods to define and execute parsing grammars 431s ============================================================================= 431s 431s The pyparsing module is an alternative approach to creating and 431s executing simple grammars, vs. the traditional lex/yacc approach, or the 431s use of regular expressions. With pyparsing, you don't need to learn 431s a new syntax for defining grammars or matching expressions - the parsing 431s module provides a library of classes that you use to construct the 431s grammar directly in Python. 431s 431s Here is a program to parse "Hello, World!" (or any greeting of the form 431s ``", !"``), built up using :class:`Word`, 431s :class:`Literal`, and :class:`And` elements 431s (the :meth:`'+'` operators create :class:`And` expressions, 431s and the strings are auto-converted to :class:`Literal` expressions):: 431s 431s from pyparsing import Word, alphas 431s 431s # define grammar of a greeting 431s greet = Word(alphas) + "," + Word(alphas) + "!" 431s 431s hello = "Hello, World!" 431s print(hello, "->", greet.parse_string(hello)) 431s 431s The program outputs the following:: 431s 431s Hello, World! -> ['Hello', ',', 'World', '!'] 431s 431s The Python representation of the grammar is quite readable, owing to the 431s self-explanatory class names, and the use of :class:`'+'`, 431s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 431s 431s The :class:`ParseResults` object returned from 431s :class:`ParserElement.parse_string` can be 431s accessed as a nested list, a dictionary, or an object with named 431s attributes. 431s 431s The pyparsing module handles some of the problems that are typically 431s vexing when writing text parsers: 431s 431s - extra or missing whitespace (the above program will also handle 431s "Hello,World!", "Hello , World !", etc.) 431s - quoted strings 431s - embedded comments 431s 431s 431s Getting Started - 431s ----------------- 431s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 431s see the base classes that most other pyparsing 431s classes inherit from. Use the docstrings for examples of how to: 431s 431s - construct literal match expressions from :class:`Literal` and 431s :class:`CaselessLiteral` classes 431s - construct character word-group expressions using the :class:`Word` 431s class 431s - see how to create repetitive expressions using :class:`ZeroOrMore` 431s and :class:`OneOrMore` classes 431s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 431s and :class:`'&'` operators to combine simple expressions into 431s more complex ones 431s - associate names with your parsed results using 431s :class:`ParserElement.set_results_name` 431s - access the parsed data, which is returned as a :class:`ParseResults` 431s object 431s - find some helpful expression short-cuts like :class:`DelimitedList` 431s and :class:`one_of` 431s - find more useful common expressions in the :class:`pyparsing_common` 431s namespace class 431s """ 431s from typing import NamedTuple 431s 431s 431s class version_info(NamedTuple): 431s major: int 431s minor: int 431s micro: int 431s releaselevel: str 431s serial: int 431s 431s @property 431s def __version__(self): 431s return ( 431s f"{self.major}.{self.minor}.{self.micro}" 431s + ( 431s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 431s "", 431s )[self.releaselevel == "final"] 431s ) 431s 431s def __str__(self): 431s return f"{__name__} {self.__version__} / {__version_time__}" 431s 431s def __repr__(self): 431s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 431s 431s 431s __version_info__ = version_info(3, 1, 3, "final", 1) 431s __version_time__ = "24 Aug 2024 23:47 UTC" 431s __version__ = __version_info__.__version__ 431s __versionTime__ = __version_time__ 431s __author__ = "Paul McGuire " 431s 431s from .util import * 431s from .exceptions import * 431s from .actions import * 431s > from .core import __diag__, __compat__ 431s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 431s E return f"{type(self).__name__}: {retString}" 431s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 431s E SyntaxError: 'return' in a 'finally' block 431s 431s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 431s _________________________ ERROR at setup of test_count _________________________ 431s 431s request = > 431s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 431s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 431s record_mode = 'none', disable_recording = False 431s pytestconfig = <_pytest.config.Config object at 0xf3388760> 431s 431s @pytest.fixture(autouse=True) # type: ignore 431s def vcr( 431s request: SubRequest, 431s vcr_markers: List[Mark], 431s vcr_cassette_dir: str, 431s record_mode: str, 431s disable_recording: bool, 431s pytestconfig: Config, 431s ) -> Iterator[Optional["Cassette"]]: 431s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 431s if disable_recording: 431s yield None 431s elif vcr_markers: 431s > from ._vcr import use_cassette 431s 431s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 431s from vcr import VCR 431s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 431s from .config import VCR 431s /usr/lib/python3/dist-packages/vcr/config.py:10: in 431s from .cassette import Cassette 431s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 431s from .patch import CassettePatcherBuilder 431s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 431s import httplib2 431s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 431s from . import auth 431s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 431s import pyparsing as pp 431s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 431s 431s # module pyparsing.py 431s # 431s # Copyright (c) 2003-2022 Paul T. McGuire 431s # 431s # Permission is hereby granted, free of charge, to any person obtaining 431s # a copy of this software and associated documentation files (the 431s # "Software"), to deal in the Software without restriction, including 431s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _________________________ ERROR at setup of test_type __________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _______________________ ERROR at setup of test_encoding ________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________________ ERROR at setup of test_schemas ________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ______________________ ERROR at setup of test_statistics _______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________________ ERROR at setup of test_density ________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________________ ERROR at setup of test_partial_apply _____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________________ ERROR at setup of test_validate_proj _____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _________________________ ERROR at setup of test_epsg __________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _________________________ ERROR at setup of test_wkt2 __________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _______________________ ERROR at setup of test_projjson ________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _______________________ ERROR at setup of test_geometry ________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _________________________ ERROR at setup of test_bbox __________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _______________________ ERROR at setup of test_centroid ________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _________________________ ERROR at setup of test_shape _________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _______________________ ERROR at setup of test_transform _______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________________ ERROR at setup of test_get_set_code ______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________________ ERROR at setup of test_validate_raster ____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_raster' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ______________________ ERROR at setup of test_asset_bands ______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_raster' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________________ ERROR at setup of test_item_validate _____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_render' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s __________________ ERROR at setup of test_collection_validate __________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_render' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _______________________ ERROR at setup of test_required ________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_sar' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s __________________________ ERROR at setup of test_all __________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_sar' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________________ ERROR at setup of test_no_args_fails _____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ______________________ ERROR at setup of test_orbit_state ______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________________ ERROR at setup of test_relative_orbit _____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________________ ERROR at setup of test_absolute_orbit _____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________________ ERROR at setup of test_anx_datetime ______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ___________ ERROR at setup of test_platform_international_designator ___________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ______________ ERROR at setup of test_relative_orbit_no_negative _______________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _________________________ ERROR at setup of test_both __________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________________ ERROR at setup of test_modify _________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ___________________ ERROR at setup of test_clear_orbit_state ___________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _________________ ERROR at setup of test_clear_relative_orbit __________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s __________________________ ERROR at setup of test_doi __________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _______________________ ERROR at setup of test_citation ________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ___________________ ERROR at setup of test_publications_one ____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________________ ERROR at setup of test_publications ______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________ ERROR at setup of test_remove_publication_one _________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ______________ ERROR at setup of test_remove_all_publications_one ______________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ______________ ERROR at setup of test_remove_publication_forward _______________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ______________ ERROR at setup of test_remove_publication_reverse _______________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ___________ ERROR at setup of test_remove_all_publications_with_some ___________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ___________ ERROR at setup of test_remove_all_publications_with_none ___________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________________ ERROR at setup of test_collection_doi _____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s __________________ ERROR at setup of test_collection_citation __________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ______________ ERROR at setup of test_collection_publications_one ______________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________ ERROR at setup of test_collection_publications ________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ___________ ERROR at setup of test_collection_remove_publication_one ___________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________ ERROR at setup of test_collection_remove_all_publications_one _________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _________ ERROR at setup of test_collection_remove_publication_forward _________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _________ ERROR at setup of test_collection_remove_publication_reverse _________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____ ERROR at setup of test_collection_remove_all_publications_with_some ______ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____ ERROR at setup of test_collection_remove_all_publications_with_none ______ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ___________________ ERROR at setup of test_validate_storage ____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________________ ERROR at setup of test_asset_platform _____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________________ ERROR at setup of test_asset_region ______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _________________ ERROR at setup of test_asset_requester_pays __________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ______________________ ERROR at setup of test_asset_tier _______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _______________________ ERROR at setup of test_validate ________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_table' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s __________________ ERROR at setup of test_validate_timestamps __________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________________ ERROR at setup of test_expires ________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _______________________ ERROR at setup of test_published _______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ______________________ ERROR at setup of test_unpublished ______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ______________________ ERROR at setup of test_add_version ______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _________________ ERROR at setup of test_version_in_properties _________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ______________ ERROR at setup of test_add_not_deprecated_version _______________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________ ERROR at setup of test_add_deprecated_version _________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________________ ERROR at setup of test_latest _________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ______________________ ERROR at setup of test_predecessor ______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _______________________ ERROR at setup of test_successor _______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _______________________ ERROR at setup of test_all_links _______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________ ERROR at setup of test_collection_add_version _________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________ ERROR at setup of test_collection_validate_all ________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s __________________ ERROR at setup of test_catalog_add_version __________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _________________ ERROR at setup of test_catalog_validate_all __________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ___________________ ERROR at setup of test_optional_version ____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________________ ERROR at setup of test_assets _________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________________ ERROR at setup of test_validate_view _____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _______________________ ERROR at setup of test_off_nadir _______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________________ ERROR at setup of test_incidence_angle ____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________________ ERROR at setup of test_azimuth ________________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ______________________ ERROR at setup of test_sun_azimuth ______________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________________ ERROR at setup of test_sun_elevation _____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________________ ERROR at setup of test_item_validate _____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s __________________ ERROR at setup of test_collection_validate __________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ___________ ERROR at setup of test_set_field[storage_options-value0] ___________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________ ERROR at setup of test_set_field[open_kwargs-value1] _____________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________ ERROR at setup of TestCatalog.test_read_remote ________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_catalog' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________ ERROR at setup of TestCatalog.test_validate_all[cat0] _____________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_catalog' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________ ERROR at setup of TestCatalog.test_validate_all[cat1] _____________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_catalog' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________ ERROR at setup of TestCatalog.test_validate_all[cat2] _____________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_catalog' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________ ERROR at setup of TestCatalog.test_validate_all[cat3] _____________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_catalog' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________ ERROR at setup of TestCatalog.test_validate_all[cat4] _____________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_catalog' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________ ERROR at setup of TestCatalog.test_validate_all[cat5] _____________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_catalog' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________ ERROR at setup of TestCatalog.test_validate_all[cat6] _____________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_catalog' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ___________ ERROR at setup of TestCatalog.test_validate_all_invalid ____________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_catalog' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________ ERROR at setup of test_validate_all_with_max_n ________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_catalog' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________ ERROR at setup of test_validate_all_with_recusive_off _____________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_catalog' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________________ ERROR at setup of test_null_datetime _____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_item' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _______________ ERROR at setup of test_null_datetime_constructor _______________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_item' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________________ ERROR at setup of test_null_geometry _____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_item' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ________________ ERROR at setup of test_relative_extension_path ________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_item' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________ ERROR at setup of test_non_hierarchical_relative_link _____________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_item' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________________ ERROR at setup of test_retry_stac_io _____________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ___________________ ERROR at setup of test_retry_stac_io_404 ___________________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s ____________ ERROR at setup of test_urls_with_non_ascii_characters _____________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _____________ ERROR at setup of test_proj_json_schema_is_readable ______________ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog0] _ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog1] _ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog2] _ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog3] _ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog4] _ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog5] _ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog6] _ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog0] _ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 432s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 432s 432s The :class:`ParseResults` object returned from 432s :class:`ParserElement.parse_string` can be 432s accessed as a nested list, a dictionary, or an object with named 432s attributes. 432s 432s The pyparsing module handles some of the problems that are typically 432s vexing when writing text parsers: 432s 432s - extra or missing whitespace (the above program will also handle 432s "Hello,World!", "Hello , World !", etc.) 432s - quoted strings 432s - embedded comments 432s 432s 432s Getting Started - 432s ----------------- 432s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 432s see the base classes that most other pyparsing 432s classes inherit from. Use the docstrings for examples of how to: 432s 432s - construct literal match expressions from :class:`Literal` and 432s :class:`CaselessLiteral` classes 432s - construct character word-group expressions using the :class:`Word` 432s class 432s - see how to create repetitive expressions using :class:`ZeroOrMore` 432s and :class:`OneOrMore` classes 432s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 432s and :class:`'&'` operators to combine simple expressions into 432s more complex ones 432s - associate names with your parsed results using 432s :class:`ParserElement.set_results_name` 432s - access the parsed data, which is returned as a :class:`ParseResults` 432s object 432s - find some helpful expression short-cuts like :class:`DelimitedList` 432s and :class:`one_of` 432s - find more useful common expressions in the :class:`pyparsing_common` 432s namespace class 432s """ 432s from typing import NamedTuple 432s 432s 432s class version_info(NamedTuple): 432s major: int 432s minor: int 432s micro: int 432s releaselevel: str 432s serial: int 432s 432s @property 432s def __version__(self): 432s return ( 432s f"{self.major}.{self.minor}.{self.micro}" 432s + ( 432s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 432s "", 432s )[self.releaselevel == "final"] 432s ) 432s 432s def __str__(self): 432s return f"{__name__} {self.__version__} / {__version_time__}" 432s 432s def __repr__(self): 432s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 432s 432s 432s __version_info__ = version_info(3, 1, 3, "final", 1) 432s __version_time__ = "24 Aug 2024 23:47 UTC" 432s __version__ = __version_info__.__version__ 432s __versionTime__ = __version_time__ 432s __author__ = "Paul McGuire " 432s 432s from .util import * 432s from .exceptions import * 432s from .actions import * 432s > from .core import __diag__, __compat__ 432s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 432s E return f"{type(self).__name__}: {retString}" 432s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 432s E SyntaxError: 'return' in a 'finally' block 432s 432s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 432s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog1] _ 432s 432s request = > 432s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 432s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 432s record_mode = 'none', disable_recording = False 432s pytestconfig = <_pytest.config.Config object at 0xf3388760> 432s 432s @pytest.fixture(autouse=True) # type: ignore 432s def vcr( 432s request: SubRequest, 432s vcr_markers: List[Mark], 432s vcr_cassette_dir: str, 432s record_mode: str, 432s disable_recording: bool, 432s pytestconfig: Config, 432s ) -> Iterator[Optional["Cassette"]]: 432s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 432s if disable_recording: 432s yield None 432s elif vcr_markers: 432s > from ._vcr import use_cassette 432s 432s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 432s from vcr import VCR 432s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 432s from .config import VCR 432s /usr/lib/python3/dist-packages/vcr/config.py:10: in 432s from .cassette import Cassette 432s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 432s from .patch import CassettePatcherBuilder 432s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 432s import httplib2 432s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 432s from . import auth 432s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 432s import pyparsing as pp 432s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 432s 432s # module pyparsing.py 432s # 432s # Copyright (c) 2003-2022 Paul T. McGuire 432s # 432s # Permission is hereby granted, free of charge, to any person obtaining 432s # a copy of this software and associated documentation files (the 432s # "Software"), to deal in the Software without restriction, including 432s # without limitation the rights to use, copy, modify, merge, publish, 432s # distribute, sublicense, and/or sell copies of the Software, and to 432s # permit persons to whom the Software is furnished to do so, subject to 432s # the following conditions: 432s # 432s # The above copyright notice and this permission notice shall be 432s # included in all copies or substantial portions of the Software. 432s # 432s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 432s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 432s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 432s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 432s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 432s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 432s # 432s 432s __doc__ = """ 432s pyparsing module - Classes and methods to define and execute parsing grammars 432s ============================================================================= 432s 432s The pyparsing module is an alternative approach to creating and 432s executing simple grammars, vs. the traditional lex/yacc approach, or the 432s use of regular expressions. With pyparsing, you don't need to learn 432s a new syntax for defining grammars or matching expressions - the parsing 432s module provides a library of classes that you use to construct the 432s grammar directly in Python. 432s 432s Here is a program to parse "Hello, World!" (or any greeting of the form 432s ``", !"``), built up using :class:`Word`, 432s :class:`Literal`, and :class:`And` elements 432s (the :meth:`'+'` operators create :class:`And` expressions, 432s and the strings are auto-converted to :class:`Literal` expressions):: 432s 432s from pyparsing import Word, alphas 432s 432s # define grammar of a greeting 432s greet = Word(alphas) + "," + Word(alphas) + "!" 432s 432s hello = "Hello, World!" 432s print(hello, "->", greet.parse_string(hello)) 432s 432s The program outputs the following:: 432s 432s Hello, World! -> ['Hello', ',', 'World', '!'] 432s 432s The Python representation of the grammar is quite readable, owing to the 432s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog2] _ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog3] _ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog4] _ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog5] _ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog6] _ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog0] ___ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog1] ___ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog2] ___ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog3] ___ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog4] ___ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog5] ___ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog6] ___ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/cassettes/test_writing' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _________ ERROR at setup of TestValidate.test_validate_current_version _________ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example0] ________ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example1] ________ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example2] ________ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example3] ________ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example4] ________ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example5] ________ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example6] ________ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example7] ________ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example8] ________ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example9] ________ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example10] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example11] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example12] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example13] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example14] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example15] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example16] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example17] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example18] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example19] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example20] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example21] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example22] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example23] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example24] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example25] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example26] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example27] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example28] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example29] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example30] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example31] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example32] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example33] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example34] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example35] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example36] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example37] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example38] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example39] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example40] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example41] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example42] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example43] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example44] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example45] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example46] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example47] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example48] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example49] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example50] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example51] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example52] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example53] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example54] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example55] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example56] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example57] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example58] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example59] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example60] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example61] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example62] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example63] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example64] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example65] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example66] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example67] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example68] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example69] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example70] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example71] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example72] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example73] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example74] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example75] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example76] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example77] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example78] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example79] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example80] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example81] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example82] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example83] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example84] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example85] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example86] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example87] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example88] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example89] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example90] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example91] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example92] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example93] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example94] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example95] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example96] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example97] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example98] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s _______ ERROR at setup of TestValidate.test_validate_examples[example99] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s ______ ERROR at setup of TestValidate.test_validate_examples[example100] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s ______ ERROR at setup of TestValidate.test_validate_examples[example101] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s ______ ERROR at setup of TestValidate.test_validate_examples[example102] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 433s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 433s ______ ERROR at setup of TestValidate.test_validate_examples[example103] _______ 433s 433s request = > 433s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 433s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 433s record_mode = 'none', disable_recording = False 433s pytestconfig = <_pytest.config.Config object at 0xf3388760> 433s 433s @pytest.fixture(autouse=True) # type: ignore 433s def vcr( 433s request: SubRequest, 433s vcr_markers: List[Mark], 433s vcr_cassette_dir: str, 433s record_mode: str, 433s disable_recording: bool, 433s pytestconfig: Config, 433s ) -> Iterator[Optional["Cassette"]]: 433s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 433s if disable_recording: 433s yield None 433s elif vcr_markers: 433s > from ._vcr import use_cassette 433s 433s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 433s from vcr import VCR 433s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 433s from .config import VCR 433s /usr/lib/python3/dist-packages/vcr/config.py:10: in 433s from .cassette import Cassette 433s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 433s from .patch import CassettePatcherBuilder 433s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 433s import httplib2 433s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 433s from . import auth 433s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 433s import pyparsing as pp 433s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 433s 433s # module pyparsing.py 433s # 433s # Copyright (c) 2003-2022 Paul T. McGuire 433s # 433s # Permission is hereby granted, free of charge, to any person obtaining 433s # a copy of this software and associated documentation files (the 433s # "Software"), to deal in the Software without restriction, including 433s # without limitation the rights to use, copy, modify, merge, publish, 433s # distribute, sublicense, and/or sell copies of the Software, and to 433s # permit persons to whom the Software is furnished to do so, subject to 433s # the following conditions: 433s # 433s # The above copyright notice and this permission notice shall be 433s # included in all copies or substantial portions of the Software. 433s # 433s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 433s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 433s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 433s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 433s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 433s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 433s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 433s # 433s 433s __doc__ = """ 433s pyparsing module - Classes and methods to define and execute parsing grammars 433s ============================================================================= 433s 433s The pyparsing module is an alternative approach to creating and 433s executing simple grammars, vs. the traditional lex/yacc approach, or the 433s use of regular expressions. With pyparsing, you don't need to learn 433s a new syntax for defining grammars or matching expressions - the parsing 433s module provides a library of classes that you use to construct the 433s grammar directly in Python. 433s 433s Here is a program to parse "Hello, World!" (or any greeting of the form 433s ``", !"``), built up using :class:`Word`, 433s :class:`Literal`, and :class:`And` elements 433s (the :meth:`'+'` operators create :class:`And` expressions, 433s and the strings are auto-converted to :class:`Literal` expressions):: 433s 433s from pyparsing import Word, alphas 433s 433s # define grammar of a greeting 433s greet = Word(alphas) + "," + Word(alphas) + "!" 433s 433s hello = "Hello, World!" 433s print(hello, "->", greet.parse_string(hello)) 433s 433s The program outputs the following:: 433s 433s Hello, World! -> ['Hello', ',', 'World', '!'] 433s 433s The Python representation of the grammar is quite readable, owing to the 433s self-explanatory class names, and the use of :class:`'+'`, 433s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 433s 433s The :class:`ParseResults` object returned from 433s :class:`ParserElement.parse_string` can be 433s accessed as a nested list, a dictionary, or an object with named 433s attributes. 433s 433s The pyparsing module handles some of the problems that are typically 433s vexing when writing text parsers: 433s 433s - extra or missing whitespace (the above program will also handle 433s "Hello,World!", "Hello , World !", etc.) 433s - quoted strings 433s - embedded comments 433s 433s 433s Getting Started - 433s ----------------- 433s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 433s see the base classes that most other pyparsing 433s classes inherit from. Use the docstrings for examples of how to: 433s 433s - construct literal match expressions from :class:`Literal` and 433s :class:`CaselessLiteral` classes 433s - construct character word-group expressions using the :class:`Word` 433s class 433s - see how to create repetitive expressions using :class:`ZeroOrMore` 433s and :class:`OneOrMore` classes 433s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 433s and :class:`'&'` operators to combine simple expressions into 433s more complex ones 433s - associate names with your parsed results using 433s :class:`ParserElement.set_results_name` 433s - access the parsed data, which is returned as a :class:`ParseResults` 433s object 433s - find some helpful expression short-cuts like :class:`DelimitedList` 433s and :class:`one_of` 433s - find more useful common expressions in the :class:`pyparsing_common` 433s namespace class 433s """ 433s from typing import NamedTuple 433s 433s 433s class version_info(NamedTuple): 433s major: int 433s minor: int 433s micro: int 433s releaselevel: str 433s serial: int 433s 433s @property 433s def __version__(self): 433s return ( 433s f"{self.major}.{self.minor}.{self.micro}" 433s + ( 433s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 433s "", 433s )[self.releaselevel == "final"] 433s ) 433s 433s def __str__(self): 433s return f"{__name__} {self.__version__} / {__version_time__}" 433s 433s def __repr__(self): 433s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 433s 433s 433s __version_info__ = version_info(3, 1, 3, "final", 1) 433s __version_time__ = "24 Aug 2024 23:47 UTC" 433s __version__ = __version_info__.__version__ 433s __versionTime__ = __version_time__ 433s __author__ = "Paul McGuire " 433s 433s from .util import * 433s from .exceptions import * 433s from .actions import * 433s > from .core import __diag__, __compat__ 433s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 433s E return f"{type(self).__name__}: {retString}" 433s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 433s E SyntaxError: 'return' in a 'finally' block 433s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example104] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example105] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example106] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example107] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example108] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example109] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example110] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example111] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example112] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example113] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example114] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example115] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example116] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example117] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example118] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example119] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example120] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example121] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example122] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example123] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_examples[example124] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s _______ ERROR at setup of TestValidate.test_validate_error_contains_href _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s _____ ERROR at setup of TestValidate.test_validate_all_deprecated_dict_arg _____ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s _ ERROR at setup of TestValidate.test_validate_all_deprecated_dict_arg_missing_href _ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s _______ ERROR at setup of TestValidate.test_validate_all_unexpected_href _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s _______________ ERROR at setup of TestValidate.test_validate_all _______________ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case0] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case1] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case2] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case3] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case4] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case5] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case6] _______ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s _ ERROR at setup of TestValidate.test_validates_geojson_with_tuple_coordinates _ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s ________ ERROR at setup of TestValidate.test_validate_custom_validator _________ 434s 434s request = > 434s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 434s vcr_cassette_dir = '/tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 434s record_mode = 'none', disable_recording = False 434s pytestconfig = <_pytest.config.Config object at 0xf3388760> 434s 434s @pytest.fixture(autouse=True) # type: ignore 434s def vcr( 434s request: SubRequest, 434s vcr_markers: List[Mark], 434s vcr_cassette_dir: str, 434s record_mode: str, 434s disable_recording: bool, 434s pytestconfig: Config, 434s ) -> Iterator[Optional["Cassette"]]: 434s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 434s if disable_recording: 434s yield None 434s elif vcr_markers: 434s > from ._vcr import use_cassette 434s 434s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 434s from vcr import VCR 434s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 434s from .config import VCR 434s /usr/lib/python3/dist-packages/vcr/config.py:10: in 434s from .cassette import Cassette 434s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 434s from .patch import CassettePatcherBuilder 434s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 434s import httplib2 434s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 434s from . import auth 434s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 434s import pyparsing as pp 434s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 434s 434s # module pyparsing.py 434s # 434s # Copyright (c) 2003-2022 Paul T. McGuire 434s # 434s # Permission is hereby granted, free of charge, to any person obtaining 434s # a copy of this software and associated documentation files (the 434s # "Software"), to deal in the Software without restriction, including 434s # without limitation the rights to use, copy, modify, merge, publish, 434s # distribute, sublicense, and/or sell copies of the Software, and to 434s # permit persons to whom the Software is furnished to do so, subject to 434s # the following conditions: 434s # 434s # The above copyright notice and this permission notice shall be 434s # included in all copies or substantial portions of the Software. 434s # 434s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 434s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 434s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 434s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 434s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 434s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 434s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 434s # 434s 434s __doc__ = """ 434s pyparsing module - Classes and methods to define and execute parsing grammars 434s ============================================================================= 434s 434s The pyparsing module is an alternative approach to creating and 434s executing simple grammars, vs. the traditional lex/yacc approach, or the 434s use of regular expressions. With pyparsing, you don't need to learn 434s a new syntax for defining grammars or matching expressions - the parsing 434s module provides a library of classes that you use to construct the 434s grammar directly in Python. 434s 434s Here is a program to parse "Hello, World!" (or any greeting of the form 434s ``", !"``), built up using :class:`Word`, 434s :class:`Literal`, and :class:`And` elements 434s (the :meth:`'+'` operators create :class:`And` expressions, 434s and the strings are auto-converted to :class:`Literal` expressions):: 434s 434s from pyparsing import Word, alphas 434s 434s # define grammar of a greeting 434s greet = Word(alphas) + "," + Word(alphas) + "!" 434s 434s hello = "Hello, World!" 434s print(hello, "->", greet.parse_string(hello)) 434s 434s The program outputs the following:: 434s 434s Hello, World! -> ['Hello', ',', 'World', '!'] 434s 434s The Python representation of the grammar is quite readable, owing to the 434s self-explanatory class names, and the use of :class:`'+'`, 434s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 434s 434s The :class:`ParseResults` object returned from 434s :class:`ParserElement.parse_string` can be 434s accessed as a nested list, a dictionary, or an object with named 434s attributes. 434s 434s The pyparsing module handles some of the problems that are typically 434s vexing when writing text parsers: 434s 434s - extra or missing whitespace (the above program will also handle 434s "Hello,World!", "Hello , World !", etc.) 434s - quoted strings 434s - embedded comments 434s 434s 434s Getting Started - 434s ----------------- 434s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 434s see the base classes that most other pyparsing 434s classes inherit from. Use the docstrings for examples of how to: 434s 434s - construct literal match expressions from :class:`Literal` and 434s :class:`CaselessLiteral` classes 434s - construct character word-group expressions using the :class:`Word` 434s class 434s - see how to create repetitive expressions using :class:`ZeroOrMore` 434s and :class:`OneOrMore` classes 434s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 434s and :class:`'&'` operators to combine simple expressions into 434s more complex ones 434s - associate names with your parsed results using 434s :class:`ParserElement.set_results_name` 434s - access the parsed data, which is returned as a :class:`ParseResults` 434s object 434s - find some helpful expression short-cuts like :class:`DelimitedList` 434s and :class:`one_of` 434s - find more useful common expressions in the :class:`pyparsing_common` 434s namespace class 434s """ 434s from typing import NamedTuple 434s 434s 434s class version_info(NamedTuple): 434s major: int 434s minor: int 434s micro: int 434s releaselevel: str 434s serial: int 434s 434s @property 434s def __version__(self): 434s return ( 434s f"{self.major}.{self.minor}.{self.micro}" 434s + ( 434s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 434s "", 434s )[self.releaselevel == "final"] 434s ) 434s 434s def __str__(self): 434s return f"{__name__} {self.__version__} / {__version_time__}" 434s 434s def __repr__(self): 434s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 434s 434s 434s __version_info__ = version_info(3, 1, 3, "final", 1) 434s __version_time__ = "24 Aug 2024 23:47 UTC" 434s __version__ = __version_info__.__version__ 434s __versionTime__ = __version_time__ 434s __author__ = "Paul McGuire " 434s 434s from .util import * 434s from .exceptions import * 434s from .actions import * 434s > from .core import __diag__, __compat__ 434s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 434s E return f"{type(self).__name__}: {retString}" 434s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 434s E SyntaxError: 'return' in a 'finally' block 434s 434s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 434s =========================== short test summary info ============================ 434s ERROR tests/extensions/test_classification.py::test_apply_bitfields - File ... 434s ERROR tests/extensions/test_classification.py::test_apply_classes - File "/... 434s ERROR tests/extensions/test_classification.py::test_validate_classification 434s ERROR tests/extensions/test_datacube.py::test_validate - File "/usr/lib/pyt... 434s ERROR tests/extensions/test_datacube.py::test_set_variables - File "/usr/li... 434s ERROR tests/extensions/test_datacube.py::test_set_dimensions - File "/usr/l... 434s ERROR tests/extensions/test_eo.py::test_validate_eo - File "/usr/lib/python... 434s ERROR tests/extensions/test_eo.py::test_bands - File "/usr/lib/python3/dist... 434s ERROR tests/extensions/test_eo.py::test_asset_bands - File "/usr/lib/python... 434s ERROR tests/extensions/test_eo.py::test_cloud_cover - File "/usr/lib/python... 434s ERROR tests/extensions/test_eo.py::test_set_field[cloud_cover-7.8] - File "... 434s ERROR tests/extensions/test_eo.py::test_set_field[snow_cover-99] - File "/u... 434s ERROR tests/extensions/test_file.py::test_validate_item - File "/usr/lib/py... 434s ERROR tests/extensions/test_file.py::test_validate_collection - File "/usr/... 434s ERROR tests/extensions/test_file.py::test_validate_catalog - File "/usr/lib... 434s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-size-1] 434s ERROR tests/extensions/test_file.py::test_set_field_on_asset[measurement-header_size-8192] 434s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-checksum-90e40210163700a8a6501eccd00b6d3b44ddaed0] 434s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-byte_order-little-endian] 434s ERROR tests/extensions/test_file.py::test_set_field_on_asset[calibrations-local_path-different-file.xml] 434s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-size-129302] 434s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-header_size-4092] 434s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-checksum-90e40210163700a8a6501eccd00b6d3b44ddaedb] 434s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-byte_order-big-endian] 434s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-local_path-a/path] 434s ERROR tests/extensions/test_file.py::test_migrate_from_v2_0_0 - File "/usr/... 434s ERROR tests/extensions/test_file.py::test_migrate_from_v1_0_0 - File "/usr/... 434s ERROR tests/extensions/test_grid.py::test_attributes - File "/usr/lib/pytho... 434s ERROR tests/extensions/test_grid.py::test_modify - File "/usr/lib/python3/d... 434s ERROR tests/extensions/test_mgrs.py::test_validate - File "/usr/lib/python3... 434s ERROR tests/extensions/test_mgrs.py::test_set_field[latitude_band-C] - File... 434s ERROR tests/extensions/test_mgrs.py::test_set_field[grid_square-ZA] - File ... 434s ERROR tests/extensions/test_mgrs.py::test_set_field[utm_zone-59] - File "/u... 434s ERROR tests/extensions/test_mlm.py::test_apply - File "/usr/lib/python3/dis... 434s ERROR tests/extensions/test_mlm.py::test_validate_mlm - File "/usr/lib/pyth... 434s ERROR tests/extensions/test_pointcloud.py::test_validate_pointcloud - File ... 434s ERROR tests/extensions/test_pointcloud.py::test_count - File "/usr/lib/pyth... 434s ERROR tests/extensions/test_pointcloud.py::test_type - File "/usr/lib/pytho... 434s ERROR tests/extensions/test_pointcloud.py::test_encoding - File "/usr/lib/p... 434s ERROR tests/extensions/test_pointcloud.py::test_schemas - File "/usr/lib/py... 434s ERROR tests/extensions/test_pointcloud.py::test_statistics - File "/usr/lib... 434s ERROR tests/extensions/test_pointcloud.py::test_density - File "/usr/lib/py... 434s ERROR tests/extensions/test_projection.py::test_partial_apply - File "/usr/... 434s ERROR tests/extensions/test_projection.py::test_validate_proj - File "/usr/... 434s ERROR tests/extensions/test_projection.py::test_epsg - File "/usr/lib/pytho... 434s ERROR tests/extensions/test_projection.py::test_wkt2 - File "/usr/lib/pytho... 434s ERROR tests/extensions/test_projection.py::test_projjson - File "/usr/lib/p... 434s ERROR tests/extensions/test_projection.py::test_geometry - File "/usr/lib/p... 434s ERROR tests/extensions/test_projection.py::test_bbox - File "/usr/lib/pytho... 434s ERROR tests/extensions/test_projection.py::test_centroid - File "/usr/lib/p... 434s ERROR tests/extensions/test_projection.py::test_shape - File "/usr/lib/pyth... 434s ERROR tests/extensions/test_projection.py::test_transform - File "/usr/lib/... 434s ERROR tests/extensions/test_projection.py::test_get_set_code - File "/usr/l... 434s ERROR tests/extensions/test_raster.py::test_validate_raster - File "/usr/li... 434s ERROR tests/extensions/test_raster.py::test_asset_bands - File "/usr/lib/py... 434s ERROR tests/extensions/test_render.py::test_item_validate - File "/usr/lib/... 434s ERROR tests/extensions/test_render.py::test_collection_validate - File "/us... 434s ERROR tests/extensions/test_sar.py::test_required - File "/usr/lib/python3/... 434s ERROR tests/extensions/test_sar.py::test_all - File "/usr/lib/python3/dist-... 434s ERROR tests/extensions/test_sat.py::test_no_args_fails - File "/usr/lib/pyt... 434s ERROR tests/extensions/test_sat.py::test_orbit_state - File "/usr/lib/pytho... 434s ERROR tests/extensions/test_sat.py::test_relative_orbit - File "/usr/lib/py... 434s ERROR tests/extensions/test_sat.py::test_absolute_orbit - File "/usr/lib/py... 434s ERROR tests/extensions/test_sat.py::test_anx_datetime - File "/usr/lib/pyth... 434s ERROR tests/extensions/test_sat.py::test_platform_international_designator - ... 434s ERROR tests/extensions/test_sat.py::test_relative_orbit_no_negative - File ... 434s ERROR tests/extensions/test_sat.py::test_both - File "/usr/lib/python3/dist... 434s ERROR tests/extensions/test_sat.py::test_modify - File "/usr/lib/python3/di... 434s ERROR tests/extensions/test_sat.py::test_clear_orbit_state - File "/usr/lib... 434s ERROR tests/extensions/test_sat.py::test_clear_relative_orbit - File "/usr/... 434s ERROR tests/extensions/test_scientific.py::test_doi - File "/usr/lib/python... 434s ERROR tests/extensions/test_scientific.py::test_citation - File "/usr/lib/p... 434s ERROR tests/extensions/test_scientific.py::test_publications_one - File "/u... 434s ERROR tests/extensions/test_scientific.py::test_publications - File "/usr/l... 434s ERROR tests/extensions/test_scientific.py::test_remove_publication_one - Fi... 434s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_one 434s ERROR tests/extensions/test_scientific.py::test_remove_publication_forward - ... 434s ERROR tests/extensions/test_scientific.py::test_remove_publication_reverse - ... 434s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_with_some 434s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_with_none 434s ERROR tests/extensions/test_scientific.py::test_collection_doi - File "/usr... 434s ERROR tests/extensions/test_scientific.py::test_collection_citation - File ... 434s ERROR tests/extensions/test_scientific.py::test_collection_publications_one 434s ERROR tests/extensions/test_scientific.py::test_collection_publications - F... 434s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_one 434s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_one 434s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_forward 434s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_reverse 434s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_with_some 434s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_with_none 434s ERROR tests/extensions/test_storage.py::test_validate_storage - File "/usr/... 434s ERROR tests/extensions/test_storage.py::test_asset_platform - File "/usr/li... 434s ERROR tests/extensions/test_storage.py::test_asset_region - File "/usr/lib/... 434s ERROR tests/extensions/test_storage.py::test_asset_requester_pays - File "/... 434s ERROR tests/extensions/test_storage.py::test_asset_tier - File "/usr/lib/py... 434s ERROR tests/extensions/test_table.py::test_validate - File "/usr/lib/python... 434s ERROR tests/extensions/test_timestamps.py::test_validate_timestamps - File ... 434s ERROR tests/extensions/test_timestamps.py::test_expires - File "/usr/lib/py... 434s ERROR tests/extensions/test_timestamps.py::test_published - File "/usr/lib/... 434s ERROR tests/extensions/test_timestamps.py::test_unpublished - File "/usr/li... 434s ERROR tests/extensions/test_version.py::test_add_version - File "/usr/lib/p... 434s ERROR tests/extensions/test_version.py::test_version_in_properties - File "... 434s ERROR tests/extensions/test_version.py::test_add_not_deprecated_version - F... 434s ERROR tests/extensions/test_version.py::test_add_deprecated_version - File ... 434s ERROR tests/extensions/test_version.py::test_latest - File "/usr/lib/python... 434s ERROR tests/extensions/test_version.py::test_predecessor - File "/usr/lib/p... 434s ERROR tests/extensions/test_version.py::test_successor - File "/usr/lib/pyt... 434s ERROR tests/extensions/test_version.py::test_all_links - File "/usr/lib/pyt... 434s ERROR tests/extensions/test_version.py::test_collection_add_version - File ... 434s ERROR tests/extensions/test_version.py::test_collection_validate_all - File... 434s ERROR tests/extensions/test_version.py::test_catalog_add_version - File "/u... 434s ERROR tests/extensions/test_version.py::test_catalog_validate_all - File "/... 434s ERROR tests/extensions/test_version.py::test_optional_version - File "/usr/... 434s ERROR tests/extensions/test_version.py::test_assets - File "/usr/lib/python... 434s ERROR tests/extensions/test_view.py::test_validate_view - File "/usr/lib/py... 434s ERROR tests/extensions/test_view.py::test_off_nadir - File "/usr/lib/python... 434s ERROR tests/extensions/test_view.py::test_incidence_angle - File "/usr/lib/... 434s ERROR tests/extensions/test_view.py::test_azimuth - File "/usr/lib/python3/... 434s ERROR tests/extensions/test_view.py::test_sun_azimuth - File "/usr/lib/pyth... 434s ERROR tests/extensions/test_view.py::test_sun_elevation - File "/usr/lib/py... 434s ERROR tests/extensions/test_xarray_assets.py::test_item_validate - File "/u... 434s ERROR tests/extensions/test_xarray_assets.py::test_collection_validate - Fi... 434s ERROR tests/extensions/test_xarray_assets.py::test_set_field[storage_options-value0] 434s ERROR tests/extensions/test_xarray_assets.py::test_set_field[open_kwargs-value1] 434s ERROR tests/test_catalog.py::TestCatalog::test_read_remote - File "/usr/lib... 434s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat0] - File "/... 434s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat1] - File "/... 434s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat2] - File "/... 434s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat3] - File "/... 434s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat4] - File "/... 434s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat5] - File "/... 434s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat6] - File "/... 434s ERROR tests/test_catalog.py::TestCatalog::test_validate_all_invalid - File ... 434s ERROR tests/test_catalog.py::test_validate_all_with_max_n - File "/usr/lib/... 434s ERROR tests/test_catalog.py::test_validate_all_with_recusive_off - File "/u... 434s ERROR tests/test_item.py::test_null_datetime - File "/usr/lib/python3/dist-... 434s ERROR tests/test_item.py::test_null_datetime_constructor - File "/usr/lib/p... 434s ERROR tests/test_item.py::test_null_geometry - File "/usr/lib/python3/dist-... 434s ERROR tests/test_item.py::test_relative_extension_path - File "/usr/lib/pyt... 434s ERROR tests/test_item.py::test_non_hierarchical_relative_link - File "/usr/... 434s ERROR tests/test_stac_io.py::test_retry_stac_io - File "/usr/lib/python3/di... 434s ERROR tests/test_stac_io.py::test_retry_stac_io_404 - File "/usr/lib/python... 434s ERROR tests/test_stac_io.py::test_urls_with_non_ascii_characters - File "/u... 434s ERROR tests/test_stac_io.py::test_proj_json_schema_is_readable - File "/usr... 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog0] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog1] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog2] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog3] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog4] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog5] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog6] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog0] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog1] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog2] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog3] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog4] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog5] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog6] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog0] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog1] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog2] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog3] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog4] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog5] 434s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog6] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_current_version 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example0] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example1] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example2] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example3] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example4] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example5] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example6] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example7] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example8] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example9] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example10] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example11] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example12] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example13] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example14] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example15] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example16] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example17] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example18] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example19] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example20] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example21] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example22] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example23] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example24] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example25] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example26] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example27] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example28] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example29] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example30] 434s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example31] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example32] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example33] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example34] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example35] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example36] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example37] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example38] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example39] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example40] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example41] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example42] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example43] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example44] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example45] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example46] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example47] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example48] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example49] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example50] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example51] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example52] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example53] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example54] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example55] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example56] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example57] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example58] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example59] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example60] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example61] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example62] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example63] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example64] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example65] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example66] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example67] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example68] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example69] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example70] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example71] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example72] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example73] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example74] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example75] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example76] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example77] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example78] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example79] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example80] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example81] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example82] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example83] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example84] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example85] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example86] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example87] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example88] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example89] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example90] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example91] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example92] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example93] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example94] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example95] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example96] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example97] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example98] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example99] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example100] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example101] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example102] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example103] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example104] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example105] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example106] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example107] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example108] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example109] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example110] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example111] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example112] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example113] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example114] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example115] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example116] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example117] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example118] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example119] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example120] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example121] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example122] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example123] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example124] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_error_contains_href 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_deprecated_dict_arg 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_deprecated_dict_arg_missing_href 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_unexpected_href 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all - ... 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case0] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case1] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case2] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case3] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case4] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case5] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case6] 435s ERROR tests/validation/test_validate.py::TestValidate::test_validates_geojson_with_tuple_coordinates 435s ERROR tests/validation/test_validate.py::TestValidate::test_validate_custom_validator 435s =========== 1234 passed, 18 skipped, 305 errors in 76.42s (0:01:16) ============ 436s E: pybuild pybuild:483: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest.ttmsXb/autopkgtest_tmp/build; python3.14 -m pytest tests 436s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p "3.13 3.14" returned exit code 13 436s make: *** [/tmp/dkEvWZpW49/run:4: pybuild-autopkgtest] Error 25 436s pybuild-autopkgtest: error: /tmp/dkEvWZpW49/run pybuild-autopkgtest returned exit code 2 437s autopkgtest [20:20:10]: test pybuild-autopkgtest: -----------------------] 441s autopkgtest [20:20:14]: test pybuild-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 441s pybuild-autopkgtest FAIL non-zero exit status 25 446s autopkgtest [20:20:19]: @@@@@@@@@@@@@@@@@@@@ summary 446s pybuild-autopkgtest FAIL non-zero exit status 25