0s autopkgtest [14:51:11]: starting date and time: 2026-01-23 14:51:11+0000 0s autopkgtest [14:51:11]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [14:51:11]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.0c4cpyif/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:python3-defaults --apt-upgrade pystac --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=python3-defaults/3.14.2-1 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-cpu2-ram4-disk20-s390x --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@sto01-s390x-11.secgroup --name adt-resolute-s390x-pystac-20260123-145111-juju-7f2275-prod-proposed-migration-environment-2-b85389f3-c3e7-494a-abe3-a29193d296b9 --image adt/ubuntu-resolute-s390x-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-autopkgtest-workers-s390x -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 4s Creating nova instance adt-resolute-s390x-pystac-20260123-145111-juju-7f2275-prod-proposed-migration-environment-2-b85389f3-c3e7-494a-abe3-a29193d296b9 from image adt/ubuntu-resolute-s390x-server-20260123.img (UUID 5f2e306c-5dfc-4ef6-8be2-414f657c7562)... 84s autopkgtest [14:52:35]: testbed dpkg architecture: s390x 84s autopkgtest [14:52:35]: testbed apt version: 3.1.13 85s autopkgtest [14:52:36]: @@@@@@@@@@@@@@@@@@@@ test bed setup 85s autopkgtest [14:52:36]: testbed release detected to be: None 86s autopkgtest [14:52:37]: updating testbed package index (apt update) 86s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 86s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 87s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 87s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 87s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [2820 B] 87s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1019 kB] 87s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [95.0 kB] 87s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [23.6 kB] 87s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main s390x Packages [117 kB] 87s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/universe s390x Packages [837 kB] 87s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse s390x Packages [9152 B] 88s Fetched 2228 kB in 2s (1479 kB/s) 92s Reading package lists... 93s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 93s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 93s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 93s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 97s Reading package lists... 98s Reading package lists... 99s Building dependency tree... 99s Reading state information... 101s Calculating upgrade... 101s The following packages were automatically installed and are no longer required: 101s python3.13 python3.13-minimal 101s Use 'sudo apt autoremove' to remove them. 101s The following NEW packages will be installed: 101s libpython3.14-minimal libpython3.14-stdlib python3.14 python3.14-minimal 101s The following packages will be upgraded: 101s libplymouth5 libpython3-stdlib libtasn1-6 plymouth 101s plymouth-theme-ubuntu-text python3 python3-gdbm python3-jaraco.context 101s python3-minimal 102s 9 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. 102s Need to get 7066 kB of archives. 102s After this operation, 24.3 MB of additional disk space will be used. 102s Get:1 http://ftpmaster.internal/ubuntu resolute/main s390x libpython3.14-minimal s390x 3.14.2-1 [917 kB] 102s Get:2 http://ftpmaster.internal/ubuntu resolute/main s390x python3.14-minimal s390x 3.14.2-1 [2510 kB] 102s Get:3 http://ftpmaster.internal/ubuntu resolute-proposed/main s390x python3-minimal s390x 3.14.2-1 [28.2 kB] 102s Get:4 http://ftpmaster.internal/ubuntu resolute-proposed/main s390x python3 s390x 3.14.2-1 [22.9 kB] 102s Get:5 http://ftpmaster.internal/ubuntu resolute/main s390x libpython3.14-stdlib s390x 3.14.2-1 [2373 kB] 102s Get:6 http://ftpmaster.internal/ubuntu resolute/main s390x python3.14 s390x 3.14.2-1 [816 kB] 102s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/main s390x libpython3-stdlib s390x 3.14.2-1 [10.9 kB] 102s Get:8 http://ftpmaster.internal/ubuntu resolute/main s390x libtasn1-6 s390x 4.21.0-2 [48.6 kB] 102s Get:9 http://ftpmaster.internal/ubuntu resolute/main s390x libplymouth5 s390x 24.004.60+git20250831.4a3c171d-0ubuntu5 [159 kB] 102s Get:10 http://ftpmaster.internal/ubuntu resolute/main s390x plymouth-theme-ubuntu-text s390x 24.004.60+git20250831.4a3c171d-0ubuntu5 [10.2 kB] 102s Get:11 http://ftpmaster.internal/ubuntu resolute/main s390x plymouth s390x 24.004.60+git20250831.4a3c171d-0ubuntu5 [152 kB] 102s Get:12 http://ftpmaster.internal/ubuntu resolute-proposed/main s390x python3-gdbm s390x 3.14.2-1 [11.1 kB] 102s Get:13 http://ftpmaster.internal/ubuntu resolute/main s390x python3-jaraco.context all 6.0.1-2 [8198 B] 104s dpkg-preconfigure: unable to re-open stdin: No such file or directory 104s Fetched 7066 kB in 1s (9441 kB/s) 104s Selecting previously unselected package libpython3.14-minimal:s390x. 105s (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 ... 87685 files and directories currently installed.) 105s Preparing to unpack .../libpython3.14-minimal_3.14.2-1_s390x.deb ... 105s Unpacking libpython3.14-minimal:s390x (3.14.2-1) ... 106s Selecting previously unselected package python3.14-minimal. 106s Preparing to unpack .../python3.14-minimal_3.14.2-1_s390x.deb ... 106s Unpacking python3.14-minimal (3.14.2-1) ... 106s Setting up libpython3.14-minimal:s390x (3.14.2-1) ... 106s Setting up python3.14-minimal (3.14.2-1) ... 112s (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 ... 88027 files and directories currently installed.) 112s Preparing to unpack .../python3-minimal_3.14.2-1_s390x.deb ... 112s Unpacking python3-minimal (3.14.2-1) over (3.13.9-3) ... 112s Setting up python3-minimal (3.14.2-1) ... 112s (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 ... 88027 files and directories currently installed.) 112s Preparing to unpack .../0-python3_3.14.2-1_s390x.deb ... 112s running python pre-rtupdate hooks for python3.14... 112s Unpacking python3 (3.14.2-1) over (3.13.9-3) ... 113s Selecting previously unselected package libpython3.14-stdlib:s390x. 113s Preparing to unpack .../1-libpython3.14-stdlib_3.14.2-1_s390x.deb ... 113s Unpacking libpython3.14-stdlib:s390x (3.14.2-1) ... 113s Selecting previously unselected package python3.14. 113s Preparing to unpack .../2-python3.14_3.14.2-1_s390x.deb ... 113s Unpacking python3.14 (3.14.2-1) ... 114s Preparing to unpack .../3-libpython3-stdlib_3.14.2-1_s390x.deb ... 114s Unpacking libpython3-stdlib:s390x (3.14.2-1) over (3.13.9-3) ... 114s Preparing to unpack .../4-libtasn1-6_4.21.0-2_s390x.deb ... 115s Unpacking libtasn1-6:s390x (4.21.0-2) over (4.20.0-2ubuntu1) ... 115s Preparing to unpack .../5-libplymouth5_24.004.60+git20250831.4a3c171d-0ubuntu5_s390x.deb ... 115s Unpacking libplymouth5:s390x (24.004.60+git20250831.4a3c171d-0ubuntu5) over (24.004.60+git20250831.4a3c171d-0ubuntu4) ... 115s Preparing to unpack .../6-plymouth-theme-ubuntu-text_24.004.60+git20250831.4a3c171d-0ubuntu5_s390x.deb ... 115s Unpacking plymouth-theme-ubuntu-text (24.004.60+git20250831.4a3c171d-0ubuntu5) over (24.004.60+git20250831.4a3c171d-0ubuntu4) ... 116s Preparing to unpack .../7-plymouth_24.004.60+git20250831.4a3c171d-0ubuntu5_s390x.deb ... 117s Unpacking plymouth (24.004.60+git20250831.4a3c171d-0ubuntu5) over (24.004.60+git20250831.4a3c171d-0ubuntu4) ... 117s Preparing to unpack .../8-python3-gdbm_3.14.2-1_s390x.deb ... 117s Unpacking python3-gdbm (3.14.2-1) over (3.13.9-3) ... 118s Preparing to unpack .../9-python3-jaraco.context_6.0.1-2_all.deb ... 118s Unpacking python3-jaraco.context (6.0.1-2) over (6.0.1-1build1) ... 118s Setting up libpython3.14-stdlib:s390x (3.14.2-1) ... 118s Setting up libplymouth5:s390x (24.004.60+git20250831.4a3c171d-0ubuntu5) ... 118s Setting up libtasn1-6:s390x (4.21.0-2) ... 118s Setting up python3.14 (3.14.2-1) ... 124s Setting up libpython3-stdlib:s390x (3.14.2-1) ... 124s Setting up python3-gdbm (3.14.2-1) ... 124s Setting up plymouth (24.004.60+git20250831.4a3c171d-0ubuntu5) ... 124s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 125s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 126s Setting up python3 (3.14.2-1) ... 126s running python rtupdate hooks for python3.14... 126s running python post-rtupdate hooks for python3.14... 126s Setting up python3-jaraco.context (6.0.1-2) ... 127s Processing triggers for libc-bin (2.42-2ubuntu4) ... 127s Processing triggers for systemd (259-1ubuntu2) ... 127s Processing triggers for man-db (2.13.1-1) ... 129s Processing triggers for initramfs-tools (0.150ubuntu7) ... 129s update-initramfs: Generating /boot/initrd.img-6.18.0-9-generic 142s Using config file '/etc/zipl.conf' 143s Building bootmap in '/boot' 143s Adding IPL section 'ubuntu' (default) 143s Preparing boot device: vda. 143s Done. 143s Setting up plymouth-theme-ubuntu-text (24.004.60+git20250831.4a3c171d-0ubuntu5) ... 143s Processing triggers for initramfs-tools (0.150ubuntu7) ... 143s update-initramfs: Generating /boot/initrd.img-6.18.0-9-generic 159s Using config file '/etc/zipl.conf' 159s Building bootmap in '/boot' 159s Adding IPL section 'ubuntu' (default) 159s Preparing boot device: vda. 159s Done. 160s autopkgtest [14:53:51]: upgrading testbed (apt dist-upgrade and autopurge) 160s Reading package lists... 161s Building dependency tree... 161s Reading state information... 162s Calculating upgrade... 162s The following packages were automatically installed and are no longer required: 162s python3.13 python3.13-minimal 162s Use 'sudo apt autoremove' to remove them. 163s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 163s Reading package lists... 163s Building dependency tree... 163s Reading state information... 164s Solving dependencies... 165s The following packages will be REMOVED: 165s python3.13* python3.13-minimal* 166s 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. 166s After this operation, 8012 kB disk space will be freed. 166s (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 ... 88454 files and directories currently installed.) 166s Removing python3.13 (3.13.11-1) ... 166s Removing python3.13-minimal (3.13.11-1) ... 170s Processing triggers for man-db (2.13.1-1) ... 171s Processing triggers for systemd (259-1ubuntu2) ... 172s (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 ... 88427 files and directories currently installed.) 172s Purging configuration files for python3.13-minimal (3.13.11-1) ... 173s autopkgtest [14:54:04]: rebooting testbed after setup commands that affected boot 217s autopkgtest [14:54:48]: testbed running kernel: Linux 6.18.0-9-generic #9-Ubuntu SMP Mon Jan 12 15:39:23 UTC 2026 221s autopkgtest [14:54:52]: @@@@@@@@@@@@@@@@@@@@ apt-source pystac 224s Get:1 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (dsc) [3523 B] 224s Get:2 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (tar) [2455 kB] 224s Get:3 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (diff) [27.7 kB] 225s gpgv: Signature made Sat Jan 10 12:09:05 2026 UTC 225s gpgv: using RSA key 3B70F209A5FFD68903C472C5EBF48AB2578F9812 225s gpgv: issuer "antonio.valentino@tiscali.it" 225s gpgv: Can't check signature: No public key 225s dpkg-source: warning: cannot verify inline signature for ./pystac_1.14.3-1.dsc: no acceptable signature found 226s autopkgtest [14:54:57]: testing package pystac version 1.14.3-1 226s autopkgtest [14:54:57]: build not needed 227s autopkgtest [14:54:58]: test pybuild-autopkgtest: preparing testbed 227s Reading package lists... 228s Building dependency tree... 228s Reading state information... 228s Solving dependencies... 229s The following NEW packages will be installed: 229s autoconf automake autopoint autotools-dev build-essential cpp cpp-15 229s cpp-15-s390x-linux-gnu cpp-s390x-linux-gnu debhelper debugedit dh-autoreconf 229s dh-python dh-strip-nondeterminism docutils-common dwz fontconfig-config 229s fonts-dejavu-core fonts-dejavu-mono fonts-mathjax g++ g++-15 229s g++-15-s390x-linux-gnu g++-s390x-linux-gnu gcc gcc-15 gcc-15-s390x-linux-gnu 229s gcc-s390x-linux-gnu gdal-data gdal-plugins gettext intltool-debian libaec0 229s libaom3 libarchive-zip-perl libarmadillo14 libarpack2t64 libasan8 libavif16 229s libblas3 libblosc1 libcc1-0 libcfitsio10t64 libdav1d7 libde265-0 229s libdebhelper-perl libdeflate0 libfile-stripnondeterminism-perl 229s libfontconfig1 libfreetype6 libfreexl1 libfyba0t64 libgcc-15-dev libgdal36 229s libgeos-c1t64 libgeos3.14.1 libgeotiff5 libgfortran5 libgif7 libgomp1 229s libgpgmepp6t64 libhdf4-0-alt libhdf5-310 libhdf5-hl-310 229s libheif-plugin-aomdec libheif-plugin-libde265 libheif1 libisl23 libitm1 229s libjbig0 libjpeg-turbo8 libjpeg8 libjs-mathjax libjson-perl libkmlbase1t64 229s libkmldom1t64 libkmlengine1t64 liblapack3 liblcms2-2 libltdl7 liblua5.4-0 229s libminizip1t64 libmpc3 libmysqlclient24 libnetcdf22 libnorm1t64 libodbc2 229s libodbcinst2 libogdi4.1 libopenjp2-7 libpgm-5.3-0t64 libpoppler147 libpq5 229s libproj25 libqhull-r8.0 librttopo1 libsharpyuv0 libsnappy1v5 libsodium23 229s libspatialite8t64 libstdc++-15-dev libsz2 libtiff6 libtool libubsan1 229s liburiparser1 libwebp7 libxerces-c3.2t64 libyuv0 libzmq5 m4 mysql-common 229s node-fortawesome-fontawesome-free pandoc pandoc-data po-debconf proj-data 229s pybuild-plugin-autopkgtest pybuild-plugin-pyproject python-pystac-doc 229s python-tinycss2-common python3-accessible-pygments python3-affine 229s python3-alabaster python3-all python3-anyio python3-astroid 229s python3-asttokens python3-bleach python3-bs4 python3-build python3-click 229s python3-click-plugins python3-cligj python3-colorama python3-decorator 229s python3-defusedxml python3-docutils python3-executing python3-fastjsonschema 229s python3-h11 python3-html5lib python3-imagesize python3-iniconfig 229s python3-installer python3-ipython python3-jedi python3-jupyter-client 229s python3-jupyter-core python3-jupyterlab-pygments python3-livereload 229s python3-matplotlib-inline python3-mistune python3-multidict python3-nbclient 229s python3-nbconvert python3-nbformat python3-nbsphinx python3-numpy 229s python3-numpy-dev python3-pandocfilters python3-parso python3-platformdirs 229s python3-pluggy python3-prompt-toolkit python3-propcache python3-psutil 229s python3-pure-eval python3-pydata-sphinx-theme python3-pyproject-hooks 229s python3-pystac python3-pytest python3-pytest-mock python3-pytest-recording 229s python3-rasterio python3-requests-mock python3-roman-numerals 229s python3-shapely python3-sniffio python3-snowballstemmer python3-soupsieve 229s python3-sphinx python3-sphinx-autobuild python3-sphinx-design 229s python3-stack-data python3-starlette python3-tinycss2 python3-tornado 229s python3-traitlets python3-typeshed python3-uvicorn python3-uvloop 229s python3-vcr python3-watchfiles python3-wcwidth python3-webencodings 229s python3-websockets python3-wheel python3-wrapt python3-wsproto python3-yarl 229s python3-zmq python3.13 python3.13-minimal sgml-base sphinx-common 229s unixodbc-common xml-core 229s 0 upgraded, 208 newly installed, 0 to remove and 0 not upgraded. 229s Need to get 186 MB of archives. 229s After this operation, 896 MB of additional disk space will be used. 229s Get:1 http://ftpmaster.internal/ubuntu resolute/main s390x python3.13-minimal s390x 3.13.11-1 [2405 kB] 230s Get:2 http://ftpmaster.internal/ubuntu resolute/main s390x python3-numpy-dev s390x 1:2.3.5+ds-3 [146 kB] 230s Get:3 http://ftpmaster.internal/ubuntu resolute/main s390x libblas3 s390x 3.12.1-7ubuntu1 [255 kB] 230s Get:4 http://ftpmaster.internal/ubuntu resolute/main s390x libgfortran5 s390x 15.2.0-11ubuntu1 [629 kB] 230s Get:5 http://ftpmaster.internal/ubuntu resolute/main s390x liblapack3 s390x 3.12.1-7ubuntu1 [2983 kB] 230s Get:6 http://ftpmaster.internal/ubuntu resolute/main s390x python3-numpy s390x 1:2.3.5+ds-3 [5305 kB] 231s Get:7 http://ftpmaster.internal/ubuntu resolute/main s390x python3.13 s390x 3.13.11-1 [758 kB] 231s Get:8 http://ftpmaster.internal/ubuntu resolute/main s390x m4 s390x 1.4.20-2 [223 kB] 231s Get:9 http://ftpmaster.internal/ubuntu resolute/main s390x autoconf all 2.72-3.1ubuntu1 [384 kB] 231s Get:10 http://ftpmaster.internal/ubuntu resolute/main s390x autotools-dev all 20240727.1 [43.4 kB] 231s Get:11 http://ftpmaster.internal/ubuntu resolute/main s390x automake all 1:1.18.1-3build1 [582 kB] 231s Get:12 http://ftpmaster.internal/ubuntu resolute/main s390x autopoint all 0.23.2-1 [620 kB] 231s Get:13 http://ftpmaster.internal/ubuntu resolute/main s390x libisl23 s390x 0.27-1build1 [702 kB] 231s Get:14 http://ftpmaster.internal/ubuntu resolute/main s390x libmpc3 s390x 1.3.1-2 [57.4 kB] 231s Get:15 http://ftpmaster.internal/ubuntu resolute/main s390x cpp-15-s390x-linux-gnu s390x 15.2.0-11ubuntu1 [10.2 MB] 231s Get:16 http://ftpmaster.internal/ubuntu resolute/main s390x cpp-15 s390x 15.2.0-11ubuntu1 [1028 B] 231s Get:17 http://ftpmaster.internal/ubuntu resolute/main s390x cpp-s390x-linux-gnu s390x 4:15.2.0-4ubuntu1 [5746 B] 231s Get:18 http://ftpmaster.internal/ubuntu resolute/main s390x cpp s390x 4:15.2.0-4ubuntu1 [22.4 kB] 231s Get:19 http://ftpmaster.internal/ubuntu resolute/main s390x libcc1-0 s390x 15.2.0-11ubuntu1 [50.0 kB] 231s Get:20 http://ftpmaster.internal/ubuntu resolute/main s390x libgomp1 s390x 15.2.0-11ubuntu1 [154 kB] 231s Get:21 http://ftpmaster.internal/ubuntu resolute/main s390x libitm1 s390x 15.2.0-11ubuntu1 [30.9 kB] 231s Get:22 http://ftpmaster.internal/ubuntu resolute/main s390x libasan8 s390x 15.2.0-11ubuntu1 [2968 kB] 231s Get:23 http://ftpmaster.internal/ubuntu resolute/main s390x libubsan1 s390x 15.2.0-11ubuntu1 [1211 kB] 232s Get:24 http://ftpmaster.internal/ubuntu resolute/main s390x libgcc-15-dev s390x 15.2.0-11ubuntu1 [1045 kB] 232s Get:25 http://ftpmaster.internal/ubuntu resolute/main s390x gcc-15-s390x-linux-gnu s390x 15.2.0-11ubuntu1 [19.9 MB] 232s Get:26 http://ftpmaster.internal/ubuntu resolute/main s390x gcc-15 s390x 15.2.0-11ubuntu1 [517 kB] 232s Get:27 http://ftpmaster.internal/ubuntu resolute/main s390x gcc-s390x-linux-gnu s390x 4:15.2.0-4ubuntu1 [1208 B] 232s Get:28 http://ftpmaster.internal/ubuntu resolute/main s390x gcc s390x 4:15.2.0-4ubuntu1 [5018 B] 232s Get:29 http://ftpmaster.internal/ubuntu resolute/main s390x libstdc++-15-dev s390x 15.2.0-11ubuntu1 [2660 kB] 232s Get:30 http://ftpmaster.internal/ubuntu resolute/main s390x g++-15-s390x-linux-gnu s390x 15.2.0-11ubuntu1 [11.7 MB] 233s Get:31 http://ftpmaster.internal/ubuntu resolute/main s390x g++-15 s390x 15.2.0-11ubuntu1 [24.6 kB] 233s Get:32 http://ftpmaster.internal/ubuntu resolute/main s390x g++-s390x-linux-gnu s390x 4:15.2.0-4ubuntu1 [956 B] 233s Get:33 http://ftpmaster.internal/ubuntu resolute/main s390x g++ s390x 4:15.2.0-4ubuntu1 [1078 B] 233s Get:34 http://ftpmaster.internal/ubuntu resolute/main s390x build-essential s390x 12.12ubuntu2 [5258 B] 233s Get:35 http://ftpmaster.internal/ubuntu resolute/main s390x libdebhelper-perl all 13.28ubuntu1 [97.4 kB] 233s Get:36 http://ftpmaster.internal/ubuntu resolute/main s390x libtool all 2.5.4-9 [169 kB] 233s Get:37 http://ftpmaster.internal/ubuntu resolute/main s390x dh-autoreconf all 21 [12.5 kB] 233s Get:38 http://ftpmaster.internal/ubuntu resolute/main s390x libarchive-zip-perl all 1.68-1 [90.2 kB] 233s Get:39 http://ftpmaster.internal/ubuntu resolute/main s390x libfile-stripnondeterminism-perl all 1.15.0-1build1 [20.6 kB] 233s Get:40 http://ftpmaster.internal/ubuntu resolute/main s390x dh-strip-nondeterminism all 1.15.0-1build1 [5110 B] 233s Get:41 http://ftpmaster.internal/ubuntu resolute/main s390x debugedit s390x 1:5.2-3 [52.8 kB] 233s Get:42 http://ftpmaster.internal/ubuntu resolute/main s390x dwz s390x 0.16-2 [121 kB] 233s Get:43 http://ftpmaster.internal/ubuntu resolute/main s390x gettext s390x 0.23.2-1 [1062 kB] 233s Get:44 http://ftpmaster.internal/ubuntu resolute/main s390x intltool-debian all 0.35.0+20060710.6build1 [24.1 kB] 233s Get:45 http://ftpmaster.internal/ubuntu resolute/main s390x po-debconf all 1.0.22 [215 kB] 233s Get:46 http://ftpmaster.internal/ubuntu resolute/main s390x debhelper all 13.28ubuntu1 [916 kB] 234s Get:47 http://ftpmaster.internal/ubuntu resolute/universe s390x dh-python all 7.20251231 [122 kB] 234s Get:48 http://ftpmaster.internal/ubuntu resolute/main s390x sgml-base all 1.31+nmu1 [11.0 kB] 234s Get:49 http://ftpmaster.internal/ubuntu resolute/main s390x xml-core all 0.19build1 [20.3 kB] 234s Get:50 http://ftpmaster.internal/ubuntu resolute/main s390x docutils-common all 0.22.4+dfsg-1 [130 kB] 234s Get:51 http://ftpmaster.internal/ubuntu resolute/main s390x fonts-dejavu-mono all 2.37-8build1 [502 kB] 234s Get:52 http://ftpmaster.internal/ubuntu resolute/main s390x fonts-dejavu-core all 2.37-8build1 [834 kB] 234s Get:53 http://ftpmaster.internal/ubuntu resolute/main s390x fontconfig-config s390x 2.15.0-2.4ubuntu1 [38.2 kB] 234s Get:54 http://ftpmaster.internal/ubuntu resolute/main s390x fonts-mathjax all 2.7.9+dfsg-1build1 [2283 kB] 234s Get:55 http://ftpmaster.internal/ubuntu resolute/universe s390x gdal-data all 3.12.1+dfsg-1 [278 kB] 234s Get:56 http://ftpmaster.internal/ubuntu resolute/universe s390x gdal-plugins s390x 3.12.1+dfsg-1 [26.8 kB] 234s Get:57 http://ftpmaster.internal/ubuntu resolute/universe s390x libaec0 s390x 1.1.4-2 [26.1 kB] 234s Get:58 http://ftpmaster.internal/ubuntu resolute/main s390x libaom3 s390x 3.13.1-2 [1513 kB] 234s Get:59 http://ftpmaster.internal/ubuntu resolute/universe s390x libarpack2t64 s390x 3.9.1-6 [110 kB] 234s Get:60 http://ftpmaster.internal/ubuntu resolute/universe s390x libarmadillo14 s390x 1:14.2.3+dfsg-1 [110 kB] 234s Get:61 http://ftpmaster.internal/ubuntu resolute/universe s390x libdav1d7 s390x 1.5.3-1 [316 kB] 234s Get:62 http://ftpmaster.internal/ubuntu resolute/main s390x libjpeg-turbo8 s390x 2.1.5-4ubuntu2 [147 kB] 234s Get:63 http://ftpmaster.internal/ubuntu resolute/main s390x libjpeg8 s390x 8c-2ubuntu11 [2146 B] 234s Get:64 http://ftpmaster.internal/ubuntu resolute/main s390x libyuv0 s390x 0.0.1922.20260106-1 [129 kB] 234s Get:65 http://ftpmaster.internal/ubuntu resolute/universe s390x libavif16 s390x 1.3.0-1ubuntu3 [123 kB] 234s Get:66 http://ftpmaster.internal/ubuntu resolute/main s390x libsnappy1v5 s390x 1.2.2-2 [33.0 kB] 234s Get:67 http://ftpmaster.internal/ubuntu resolute/universe s390x libblosc1 s390x 1.21.5+ds-2 [27.9 kB] 234s Get:68 http://ftpmaster.internal/ubuntu resolute/universe s390x libcfitsio10t64 s390x 4.6.3-1 [623 kB] 234s Get:69 http://ftpmaster.internal/ubuntu resolute/main s390x libde265-0 s390x 1.0.16-1build1 [182 kB] 234s Get:70 http://ftpmaster.internal/ubuntu resolute/main s390x libdeflate0 s390x 1.23-2 [46.0 kB] 234s Get:71 http://ftpmaster.internal/ubuntu resolute/main s390x libfreetype6 s390x 2.14.1+dfsg-2 [443 kB] 234s Get:72 http://ftpmaster.internal/ubuntu resolute/main s390x libfontconfig1 s390x 2.15.0-2.4ubuntu1 [150 kB] 234s Get:73 http://ftpmaster.internal/ubuntu resolute/universe s390x libfyba0t64 s390x 4.1.1-11build2 [123 kB] 234s Get:74 http://ftpmaster.internal/ubuntu resolute/universe s390x libminizip1t64 s390x 1:1.3.dfsg+really1.3.1-1ubuntu2 [24.4 kB] 234s Get:75 http://ftpmaster.internal/ubuntu resolute/universe s390x libfreexl1 s390x 2.0.0-1build3 [46.1 kB] 234s Get:76 http://ftpmaster.internal/ubuntu resolute/universe s390x libgeos3.14.1 s390x 3.14.1-2 [993 kB] 234s Get:77 http://ftpmaster.internal/ubuntu resolute/universe s390x libgeos-c1t64 s390x 3.14.1-2 [110 kB] 234s Get:78 http://ftpmaster.internal/ubuntu resolute/universe s390x proj-data all 9.7.1-1 [7950 kB] 235s Get:79 http://ftpmaster.internal/ubuntu resolute/main s390x libjbig0 s390x 2.1-6.1ubuntu3 [32.8 kB] 235s Get:80 http://ftpmaster.internal/ubuntu resolute/main s390x libsharpyuv0 s390x 1.5.0-0.1build1 [16.6 kB] 235s Get:81 http://ftpmaster.internal/ubuntu resolute/main s390x libwebp7 s390x 1.5.0-0.1build1 [227 kB] 235s Get:82 http://ftpmaster.internal/ubuntu resolute/main s390x libtiff6 s390x 4.7.0-3ubuntu3 [222 kB] 235s Get:83 http://ftpmaster.internal/ubuntu resolute/universe s390x libproj25 s390x 9.7.1-1 [1489 kB] 235s Get:84 http://ftpmaster.internal/ubuntu resolute/universe s390x libgeotiff5 s390x 1.7.4-1 [64.3 kB] 235s Get:85 http://ftpmaster.internal/ubuntu resolute/main s390x libgif7 s390x 5.2.2-1ubuntu3 [37.8 kB] 235s Get:86 http://ftpmaster.internal/ubuntu resolute/universe s390x libsz2 s390x 1.1.4-2 [5628 B] 235s Get:87 http://ftpmaster.internal/ubuntu resolute/universe s390x libhdf4-0-alt s390x 4.3.0-1 [300 kB] 235s Get:88 http://ftpmaster.internal/ubuntu resolute/universe s390x libhdf5-310 s390x 1.14.6+repack-2 [1473 kB] 235s Get:89 http://ftpmaster.internal/ubuntu resolute/main s390x libheif-plugin-aomdec s390x 1.21.2-1 [14.4 kB] 235s Get:90 http://ftpmaster.internal/ubuntu resolute/main s390x libheif-plugin-libde265 s390x 1.21.2-1 [10.0 kB] 235s Get:91 http://ftpmaster.internal/ubuntu resolute/main s390x libheif1 s390x 1.21.2-1 [557 kB] 236s Get:92 http://ftpmaster.internal/ubuntu resolute/universe s390x liburiparser1 s390x 0.9.8+dfsg-2 [42.4 kB] 236s Get:93 http://ftpmaster.internal/ubuntu resolute/universe s390x libkmlbase1t64 s390x 1.3.0-13 [50.5 kB] 236s Get:94 http://ftpmaster.internal/ubuntu resolute/universe s390x libkmldom1t64 s390x 1.3.0-13 [147 kB] 236s Get:95 http://ftpmaster.internal/ubuntu resolute/universe s390x libkmlengine1t64 s390x 1.3.0-13 [69.7 kB] 236s Get:96 http://ftpmaster.internal/ubuntu resolute/main s390x mysql-common all 5.8+1.1.1ubuntu2 [7002 B] 236s Get:97 http://ftpmaster.internal/ubuntu resolute/main s390x libmysqlclient24 s390x 8.4.7-0ubuntu3 [1312 kB] 236s Get:98 http://ftpmaster.internal/ubuntu resolute/universe s390x libhdf5-hl-310 s390x 1.14.6+repack-2 [60.9 kB] 236s Get:99 http://ftpmaster.internal/ubuntu resolute/universe s390x libnetcdf22 s390x 1:4.9.3-1build1 [583 kB] 236s Get:100 http://ftpmaster.internal/ubuntu resolute/main s390x libltdl7 s390x 2.5.4-9 [44.4 kB] 236s Get:101 http://ftpmaster.internal/ubuntu resolute/main s390x libodbc2 s390x 2.3.14-1 [164 kB] 236s Get:102 http://ftpmaster.internal/ubuntu resolute/main s390x unixodbc-common all 2.3.14-1 [8792 B] 236s Get:103 http://ftpmaster.internal/ubuntu resolute/main s390x libodbcinst2 s390x 2.3.14-1 [33.0 kB] 236s Get:104 http://ftpmaster.internal/ubuntu resolute/universe s390x libogdi4.1 s390x 4.1.1+ds-5 [219 kB] 236s Get:105 http://ftpmaster.internal/ubuntu resolute/main s390x libopenjp2-7 s390x 2.5.4-1 [208 kB] 236s Get:106 http://ftpmaster.internal/ubuntu resolute/main s390x libgpgmepp6t64 s390x 1.24.2-3ubuntu2 [123 kB] 236s Get:107 http://ftpmaster.internal/ubuntu resolute/main s390x liblcms2-2 s390x 2.17-1 [176 kB] 236s Get:108 http://ftpmaster.internal/ubuntu resolute/main s390x libpoppler147 s390x 25.03.0-11.1 [1252 kB] 236s Get:109 http://ftpmaster.internal/ubuntu resolute/main s390x libpq5 s390x 18.1-2 [157 kB] 236s Get:110 http://ftpmaster.internal/ubuntu resolute/universe s390x libqhull-r8.0 s390x 2020.2-8 [199 kB] 236s Get:111 http://ftpmaster.internal/ubuntu resolute/universe s390x librttopo1 s390x 1.1.0-4 [196 kB] 236s Get:112 http://ftpmaster.internal/ubuntu resolute/universe s390x libspatialite8t64 s390x 5.1.0-3ubuntu1 [1974 kB] 236s Get:113 http://ftpmaster.internal/ubuntu resolute/universe s390x libxerces-c3.2t64 s390x 3.2.4+debian-1.3build2 [986 kB] 236s Get:114 http://ftpmaster.internal/ubuntu resolute/universe s390x libgdal36 s390x 3.10.3+dfsg-1build3 [9766 kB] 237s Get:115 http://ftpmaster.internal/ubuntu resolute/main s390x libjson-perl all 4.10000-1 [81.9 kB] 237s Get:116 http://ftpmaster.internal/ubuntu resolute/main s390x liblua5.4-0 s390x 5.4.8-1 [173 kB] 237s Get:117 http://ftpmaster.internal/ubuntu resolute/universe s390x libnorm1t64 s390x 1.5.9+dfsg-4 [156 kB] 237s Get:118 http://ftpmaster.internal/ubuntu resolute/universe s390x libpgm-5.3-0t64 s390x 5.3.128~dfsg-2.1build2 [169 kB] 237s Get:119 http://ftpmaster.internal/ubuntu resolute/main s390x libsodium23 s390x 1.0.18-2 [138 kB] 237s Get:120 http://ftpmaster.internal/ubuntu resolute/universe s390x libzmq5 s390x 4.3.5-1build3 [252 kB] 237s Get:121 http://ftpmaster.internal/ubuntu resolute/universe s390x node-fortawesome-fontawesome-free all 6.7.2+ds1-1 [1653 kB] 237s Get:122 http://ftpmaster.internal/ubuntu resolute/universe s390x pandoc-data all 3.1.11.1-3build1 [78.8 kB] 237s Get:123 http://ftpmaster.internal/ubuntu resolute/universe s390x pandoc s390x 3.1.11.1+ds-4 [52.5 MB] 240s Get:124 http://ftpmaster.internal/ubuntu resolute/universe s390x pybuild-plugin-autopkgtest all 7.20251231 [1748 B] 240s Get:125 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-pyproject-hooks all 1.2.0-1 [10.2 kB] 240s Get:126 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-wheel all 0.46.1-2 [22.1 kB] 240s Get:127 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-build all 1.2.2-5 [30.9 kB] 240s Get:128 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-installer all 0.7.0+dfsg1-3 [17.4 kB] 240s Get:129 http://ftpmaster.internal/ubuntu resolute/universe s390x pybuild-plugin-pyproject all 7.20251231 [1714 B] 240s Get:130 http://ftpmaster.internal/ubuntu resolute/universe s390x python-pystac-doc all 1.14.3-1 [2276 kB] 240s Get:131 http://ftpmaster.internal/ubuntu resolute/universe s390x python-tinycss2-common all 1.5.1-1 [47.3 kB] 240s Get:132 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-accessible-pygments all 0.0.5-2build1 [790 kB] 240s Get:133 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-affine all 2.4.0-2 [14.0 kB] 240s Get:134 http://ftpmaster.internal/ubuntu resolute-proposed/main s390x python3-all s390x 3.14.2-1 [890 B] 240s Get:135 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-sniffio all 1.3.1-1 [7262 B] 240s Get:136 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-anyio all 4.11.0-3 [72.6 kB] 240s Get:137 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-astroid all 4.0.2-1ubuntu1 [172 kB] 240s Get:138 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-asttokens all 3.0.1-1 [20.7 kB] 240s Get:139 http://ftpmaster.internal/ubuntu resolute/main s390x python3-webencodings all 0.5.1-5build1 [11.7 kB] 241s Get:140 http://ftpmaster.internal/ubuntu resolute/main s390x python3-html5lib all 1.2-3 [90.6 kB] 241s Get:141 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-bleach all 6.3.0-1 [44.2 kB] 241s Get:142 http://ftpmaster.internal/ubuntu resolute/main s390x python3-soupsieve all 2.8.1-1 [33.7 kB] 241s Get:143 http://ftpmaster.internal/ubuntu resolute/main s390x python3-bs4 all 4.14.3-2build1 [84.8 kB] 241s Get:144 http://ftpmaster.internal/ubuntu resolute/main s390x python3-click all 8.2.0+0.really.8.1.8-1build1 [80.2 kB] 241s Get:145 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-click-plugins all 1.1.1-5 [9760 B] 241s Get:146 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-cligj all 0.7.2-3 [8006 B] 241s Get:147 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-colorama all 0.4.6-4build1 [32.2 kB] 241s Get:148 http://ftpmaster.internal/ubuntu resolute/main s390x python3-decorator all 5.2.1-2 [28.1 kB] 241s Get:149 http://ftpmaster.internal/ubuntu resolute/main s390x python3-defusedxml all 0.7.1-3build1 [42.4 kB] 241s Get:150 http://ftpmaster.internal/ubuntu resolute/main s390x python3-roman-numerals all 4.1.0-1 [8660 B] 241s Get:151 http://ftpmaster.internal/ubuntu resolute/main s390x python3-docutils all 0.22.4+dfsg-1 [439 kB] 241s Get:152 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-executing all 2.2.1-0.1 [26.2 kB] 241s Get:153 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-fastjsonschema all 2.21.1-1 [20.4 kB] 241s Get:154 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-h11 all 0.14.0-1.1 [51.6 kB] 241s Get:155 http://ftpmaster.internal/ubuntu resolute/main s390x python3-imagesize all 1.4.1-1build1 [6900 B] 241s Get:156 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-iniconfig all 2.1.0-2 [6962 B] 241s Get:157 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-parso all 0.8.5-1 [68.0 kB] 241s Get:158 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-typeshed all 0.0~git20241223.ea91db2-4 [1554 kB] 241s Get:159 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-jedi all 0.19.1+ds1-1build1 [694 kB] 241s Get:160 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-traitlets all 5.14.3+really5.14.3-2 [71.7 kB] 241s Get:161 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-matplotlib-inline all 0.2.1-1 [9462 B] 241s Get:162 http://ftpmaster.internal/ubuntu resolute/main s390x python3-wcwidth all 0.2.14+dfsg1-1build1 [26.5 kB] 241s Get:163 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-prompt-toolkit all 3.0.52-2 [258 kB] 241s Get:164 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-pure-eval all 0.2.3-1 [11.4 kB] 241s Get:165 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-stack-data all 0.6.3-3 [22.2 kB] 241s Get:166 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-ipython all 8.35.0-2 [575 kB] 241s Get:167 http://ftpmaster.internal/ubuntu resolute/main s390x python3-platformdirs all 4.5.1-1 [17.1 kB] 241s Get:168 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-jupyter-core all 5.9.1-1 [28.9 kB] 241s Get:169 http://ftpmaster.internal/ubuntu resolute/main s390x python3-psutil s390x 7.1.0-1ubuntu1 [191 kB] 241s Get:170 http://ftpmaster.internal/ubuntu resolute/main s390x python3-tornado s390x 6.5.4-0.1 [306 kB] 241s Get:171 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-zmq s390x 27.1.0-1 [248 kB] 241s Get:172 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-jupyter-client all 8.7.0-1 [78.5 kB] 241s Get:173 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-jupyterlab-pygments all 0.2.2-3build1 [6188 B] 241s Get:174 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-livereload all 2.7.1-0.1 [22.7 kB] 241s Get:175 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-mistune all 3.1.4-1 [35.0 kB] 241s Get:176 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-multidict s390x 6.4.3-1build1 [73.5 kB] 241s Get:177 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-nbformat all 5.10.4-1 [39.2 kB] 241s Get:178 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-nbclient all 0.10.4-1 [22.6 kB] 241s Get:179 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-tinycss2 all 1.5.1-1 [23.3 kB] 241s Get:180 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-pandocfilters all 1.5.1-1 [23.6 kB] 241s Get:181 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-nbconvert all 7.16.6-1 [140 kB] 241s Get:182 http://ftpmaster.internal/ubuntu resolute/main s390x sphinx-common all 8.2.3-12 [657 kB] 241s Get:183 http://ftpmaster.internal/ubuntu resolute/main s390x python3-alabaster all 0.7.16-0.1build1 [18.6 kB] 241s Get:184 http://ftpmaster.internal/ubuntu resolute/main s390x python3-snowballstemmer all 3.0.1-1 [65.9 kB] 241s Get:185 http://ftpmaster.internal/ubuntu resolute/main s390x python3-sphinx all 8.2.3-12 [483 kB] 241s Get:186 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-nbsphinx all 0.9.5+ds-1 [41.0 kB] 241s Get:187 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-pluggy all 1.6.0-2 [21.1 kB] 241s Get:188 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-propcache s390x 0.3.1-1build1 [56.4 kB] 241s Get:189 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-pydata-sphinx-theme all 0.16.1+dfsg-5 [944 kB] 241s Get:190 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-pystac all 1.14.3-1 [150 kB] 241s Get:191 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-pytest all 9.0.2-2 [277 kB] 241s Get:192 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-pytest-mock all 3.15.1-1 [11.9 kB] 241s Get:193 http://ftpmaster.internal/ubuntu resolute/main s390x python3-wrapt s390x 1.17.3-3 [41.1 kB] 241s Get:194 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-yarl s390x 1.22.0-1 [105 kB] 241s Get:195 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-vcr all 7.0.0-2 [33.3 kB] 241s Get:196 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-pytest-recording all 0.13.4-1 [15.9 kB] 241s Get:197 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-rasterio s390x 1.4.3-2build2 [2170 kB] 241s Get:198 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-requests-mock all 1.12.1-4 [17.9 kB] 241s Get:199 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-shapely s390x 2.1.2-1ubuntu1 [435 kB] 241s Get:200 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-starlette all 0.50.0-1 [53.0 kB] 241s Get:201 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-uvloop s390x 0.22.1+ds1-2 [942 kB] 241s Get:202 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-wsproto all 1.3.2-1 [21.8 kB] 241s Get:203 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-uvicorn all 0.38.0-1 [45.9 kB] 241s Get:204 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-watchfiles s390x 1.1.1-2 [399 kB] 241s Get:205 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-websockets s390x 15.0.1-1build1 [98.5 kB] 241s Get:206 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-sphinx-autobuild all 2025.08.25-1 [12.0 kB] 241s Get:207 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-sphinx-design all 0.7.0-1 [896 kB] 241s Get:208 http://ftpmaster.internal/ubuntu resolute/main s390x libjs-mathjax all 2.7.9+dfsg-1build1 [6017 kB] 245s Fetched 186 MB in 13s (14.2 MB/s) 245s Selecting previously unselected package python3.13-minimal. 246s (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 ... 88429 files and directories currently installed.) 246s Preparing to unpack .../000-python3.13-minimal_3.13.11-1_s390x.deb ... 246s Unpacking python3.13-minimal (3.13.11-1) ... 246s Selecting previously unselected package python3-numpy-dev:s390x. 246s Preparing to unpack .../001-python3-numpy-dev_1%3a2.3.5+ds-3_s390x.deb ... 246s Unpacking python3-numpy-dev:s390x (1:2.3.5+ds-3) ... 246s Selecting previously unselected package libblas3:s390x. 246s Preparing to unpack .../002-libblas3_3.12.1-7ubuntu1_s390x.deb ... 246s Unpacking libblas3:s390x (3.12.1-7ubuntu1) ... 246s Selecting previously unselected package libgfortran5:s390x. 246s Preparing to unpack .../003-libgfortran5_15.2.0-11ubuntu1_s390x.deb ... 246s Unpacking libgfortran5:s390x (15.2.0-11ubuntu1) ... 246s Selecting previously unselected package liblapack3:s390x. 246s Preparing to unpack .../004-liblapack3_3.12.1-7ubuntu1_s390x.deb ... 246s Unpacking liblapack3:s390x (3.12.1-7ubuntu1) ... 246s Selecting previously unselected package python3-numpy. 246s Preparing to unpack .../005-python3-numpy_1%3a2.3.5+ds-3_s390x.deb ... 246s Unpacking python3-numpy (1:2.3.5+ds-3) ... 247s Selecting previously unselected package python3.13. 247s Preparing to unpack .../006-python3.13_3.13.11-1_s390x.deb ... 247s Unpacking python3.13 (3.13.11-1) ... 247s Selecting previously unselected package m4. 248s Preparing to unpack .../007-m4_1.4.20-2_s390x.deb ... 248s Unpacking m4 (1.4.20-2) ... 248s Selecting previously unselected package autoconf. 248s Preparing to unpack .../008-autoconf_2.72-3.1ubuntu1_all.deb ... 248s Unpacking autoconf (2.72-3.1ubuntu1) ... 248s Selecting previously unselected package autotools-dev. 248s Preparing to unpack .../009-autotools-dev_20240727.1_all.deb ... 248s Unpacking autotools-dev (20240727.1) ... 248s Selecting previously unselected package automake. 248s Preparing to unpack .../010-automake_1%3a1.18.1-3build1_all.deb ... 248s Unpacking automake (1:1.18.1-3build1) ... 248s Selecting previously unselected package autopoint. 248s Preparing to unpack .../011-autopoint_0.23.2-1_all.deb ... 248s Unpacking autopoint (0.23.2-1) ... 248s Selecting previously unselected package libisl23:s390x. 248s Preparing to unpack .../012-libisl23_0.27-1build1_s390x.deb ... 248s Unpacking libisl23:s390x (0.27-1build1) ... 248s Selecting previously unselected package libmpc3:s390x. 248s Preparing to unpack .../013-libmpc3_1.3.1-2_s390x.deb ... 248s Unpacking libmpc3:s390x (1.3.1-2) ... 248s Selecting previously unselected package cpp-15-s390x-linux-gnu. 248s Preparing to unpack .../014-cpp-15-s390x-linux-gnu_15.2.0-11ubuntu1_s390x.deb ... 248s Unpacking cpp-15-s390x-linux-gnu (15.2.0-11ubuntu1) ... 250s Selecting previously unselected package cpp-15. 250s Preparing to unpack .../015-cpp-15_15.2.0-11ubuntu1_s390x.deb ... 250s Unpacking cpp-15 (15.2.0-11ubuntu1) ... 250s Selecting previously unselected package cpp-s390x-linux-gnu. 250s Preparing to unpack .../016-cpp-s390x-linux-gnu_4%3a15.2.0-4ubuntu1_s390x.deb ... 250s Unpacking cpp-s390x-linux-gnu (4:15.2.0-4ubuntu1) ... 250s Selecting previously unselected package cpp. 250s Preparing to unpack .../017-cpp_4%3a15.2.0-4ubuntu1_s390x.deb ... 250s Unpacking cpp (4:15.2.0-4ubuntu1) ... 250s Selecting previously unselected package libcc1-0:s390x. 250s Preparing to unpack .../018-libcc1-0_15.2.0-11ubuntu1_s390x.deb ... 250s Unpacking libcc1-0:s390x (15.2.0-11ubuntu1) ... 250s Selecting previously unselected package libgomp1:s390x. 250s Preparing to unpack .../019-libgomp1_15.2.0-11ubuntu1_s390x.deb ... 250s Unpacking libgomp1:s390x (15.2.0-11ubuntu1) ... 250s Selecting previously unselected package libitm1:s390x. 250s Preparing to unpack .../020-libitm1_15.2.0-11ubuntu1_s390x.deb ... 250s Unpacking libitm1:s390x (15.2.0-11ubuntu1) ... 250s Selecting previously unselected package libasan8:s390x. 250s Preparing to unpack .../021-libasan8_15.2.0-11ubuntu1_s390x.deb ... 250s Unpacking libasan8:s390x (15.2.0-11ubuntu1) ... 252s Selecting previously unselected package libubsan1:s390x. 252s Preparing to unpack .../022-libubsan1_15.2.0-11ubuntu1_s390x.deb ... 252s Unpacking libubsan1:s390x (15.2.0-11ubuntu1) ... 252s Selecting previously unselected package libgcc-15-dev:s390x. 252s Preparing to unpack .../023-libgcc-15-dev_15.2.0-11ubuntu1_s390x.deb ... 252s Unpacking libgcc-15-dev:s390x (15.2.0-11ubuntu1) ... 252s Selecting previously unselected package gcc-15-s390x-linux-gnu. 252s Preparing to unpack .../024-gcc-15-s390x-linux-gnu_15.2.0-11ubuntu1_s390x.deb ... 252s Unpacking gcc-15-s390x-linux-gnu (15.2.0-11ubuntu1) ... 254s Selecting previously unselected package gcc-15. 254s Preparing to unpack .../025-gcc-15_15.2.0-11ubuntu1_s390x.deb ... 254s Unpacking gcc-15 (15.2.0-11ubuntu1) ... 254s Selecting previously unselected package gcc-s390x-linux-gnu. 254s Preparing to unpack .../026-gcc-s390x-linux-gnu_4%3a15.2.0-4ubuntu1_s390x.deb ... 254s Unpacking gcc-s390x-linux-gnu (4:15.2.0-4ubuntu1) ... 254s Selecting previously unselected package gcc. 255s Preparing to unpack .../027-gcc_4%3a15.2.0-4ubuntu1_s390x.deb ... 255s Unpacking gcc (4:15.2.0-4ubuntu1) ... 255s Selecting previously unselected package libstdc++-15-dev:s390x. 255s Preparing to unpack .../028-libstdc++-15-dev_15.2.0-11ubuntu1_s390x.deb ... 255s Unpacking libstdc++-15-dev:s390x (15.2.0-11ubuntu1) ... 255s Selecting previously unselected package g++-15-s390x-linux-gnu. 255s Preparing to unpack .../029-g++-15-s390x-linux-gnu_15.2.0-11ubuntu1_s390x.deb ... 255s Unpacking g++-15-s390x-linux-gnu (15.2.0-11ubuntu1) ... 256s Selecting previously unselected package g++-15. 256s Preparing to unpack .../030-g++-15_15.2.0-11ubuntu1_s390x.deb ... 256s Unpacking g++-15 (15.2.0-11ubuntu1) ... 256s Selecting previously unselected package g++-s390x-linux-gnu. 256s Preparing to unpack .../031-g++-s390x-linux-gnu_4%3a15.2.0-4ubuntu1_s390x.deb ... 256s Unpacking g++-s390x-linux-gnu (4:15.2.0-4ubuntu1) ... 256s Selecting previously unselected package g++. 256s Preparing to unpack .../032-g++_4%3a15.2.0-4ubuntu1_s390x.deb ... 256s Unpacking g++ (4:15.2.0-4ubuntu1) ... 256s Selecting previously unselected package build-essential. 256s Preparing to unpack .../033-build-essential_12.12ubuntu2_s390x.deb ... 256s Unpacking build-essential (12.12ubuntu2) ... 256s Selecting previously unselected package libdebhelper-perl. 256s Preparing to unpack .../034-libdebhelper-perl_13.28ubuntu1_all.deb ... 256s Unpacking libdebhelper-perl (13.28ubuntu1) ... 256s Selecting previously unselected package libtool. 256s Preparing to unpack .../035-libtool_2.5.4-9_all.deb ... 256s Unpacking libtool (2.5.4-9) ... 256s Selecting previously unselected package dh-autoreconf. 256s Preparing to unpack .../036-dh-autoreconf_21_all.deb ... 256s Unpacking dh-autoreconf (21) ... 256s Selecting previously unselected package libarchive-zip-perl. 256s Preparing to unpack .../037-libarchive-zip-perl_1.68-1_all.deb ... 256s Unpacking libarchive-zip-perl (1.68-1) ... 256s Selecting previously unselected package libfile-stripnondeterminism-perl. 257s Preparing to unpack .../038-libfile-stripnondeterminism-perl_1.15.0-1build1_all.deb ... 257s Unpacking libfile-stripnondeterminism-perl (1.15.0-1build1) ... 257s Selecting previously unselected package dh-strip-nondeterminism. 257s Preparing to unpack .../039-dh-strip-nondeterminism_1.15.0-1build1_all.deb ... 257s Unpacking dh-strip-nondeterminism (1.15.0-1build1) ... 257s Selecting previously unselected package debugedit. 257s Preparing to unpack .../040-debugedit_1%3a5.2-3_s390x.deb ... 257s Unpacking debugedit (1:5.2-3) ... 257s Selecting previously unselected package dwz. 257s Preparing to unpack .../041-dwz_0.16-2_s390x.deb ... 257s Unpacking dwz (0.16-2) ... 257s Selecting previously unselected package gettext. 257s Preparing to unpack .../042-gettext_0.23.2-1_s390x.deb ... 257s Unpacking gettext (0.23.2-1) ... 257s Selecting previously unselected package intltool-debian. 257s Preparing to unpack .../043-intltool-debian_0.35.0+20060710.6build1_all.deb ... 257s Unpacking intltool-debian (0.35.0+20060710.6build1) ... 257s Selecting previously unselected package po-debconf. 257s Preparing to unpack .../044-po-debconf_1.0.22_all.deb ... 257s Unpacking po-debconf (1.0.22) ... 257s Selecting previously unselected package debhelper. 257s Preparing to unpack .../045-debhelper_13.28ubuntu1_all.deb ... 257s Unpacking debhelper (13.28ubuntu1) ... 258s Selecting previously unselected package dh-python. 258s Preparing to unpack .../046-dh-python_7.20251231_all.deb ... 258s Unpacking dh-python (7.20251231) ... 258s Selecting previously unselected package sgml-base. 258s Preparing to unpack .../047-sgml-base_1.31+nmu1_all.deb ... 258s Unpacking sgml-base (1.31+nmu1) ... 258s Selecting previously unselected package xml-core. 258s Preparing to unpack .../048-xml-core_0.19build1_all.deb ... 258s Unpacking xml-core (0.19build1) ... 258s Selecting previously unselected package docutils-common. 258s Preparing to unpack .../049-docutils-common_0.22.4+dfsg-1_all.deb ... 258s Unpacking docutils-common (0.22.4+dfsg-1) ... 258s Selecting previously unselected package fonts-dejavu-mono. 258s Preparing to unpack .../050-fonts-dejavu-mono_2.37-8build1_all.deb ... 258s Unpacking fonts-dejavu-mono (2.37-8build1) ... 258s Selecting previously unselected package fonts-dejavu-core. 258s Preparing to unpack .../051-fonts-dejavu-core_2.37-8build1_all.deb ... 258s Unpacking fonts-dejavu-core (2.37-8build1) ... 258s Selecting previously unselected package fontconfig-config. 258s Preparing to unpack .../052-fontconfig-config_2.15.0-2.4ubuntu1_s390x.deb ... 259s Unpacking fontconfig-config (2.15.0-2.4ubuntu1) ... 259s Selecting previously unselected package fonts-mathjax. 259s Preparing to unpack .../053-fonts-mathjax_2.7.9+dfsg-1build1_all.deb ... 259s Unpacking fonts-mathjax (2.7.9+dfsg-1build1) ... 259s Selecting previously unselected package gdal-data. 259s Preparing to unpack .../054-gdal-data_3.12.1+dfsg-1_all.deb ... 259s Unpacking gdal-data (3.12.1+dfsg-1) ... 259s Selecting previously unselected package gdal-plugins:s390x. 259s Preparing to unpack .../055-gdal-plugins_3.12.1+dfsg-1_s390x.deb ... 259s Unpacking gdal-plugins:s390x (3.12.1+dfsg-1) ... 259s Selecting previously unselected package libaec0:s390x. 259s Preparing to unpack .../056-libaec0_1.1.4-2_s390x.deb ... 259s Unpacking libaec0:s390x (1.1.4-2) ... 259s Selecting previously unselected package libaom3:s390x. 259s Preparing to unpack .../057-libaom3_3.13.1-2_s390x.deb ... 259s Unpacking libaom3:s390x (3.13.1-2) ... 259s Selecting previously unselected package libarpack2t64:s390x. 259s Preparing to unpack .../058-libarpack2t64_3.9.1-6_s390x.deb ... 259s Unpacking libarpack2t64:s390x (3.9.1-6) ... 259s Selecting previously unselected package libarmadillo14. 259s Preparing to unpack .../059-libarmadillo14_1%3a14.2.3+dfsg-1_s390x.deb ... 259s Unpacking libarmadillo14 (1:14.2.3+dfsg-1) ... 259s Selecting previously unselected package libdav1d7:s390x. 259s Preparing to unpack .../060-libdav1d7_1.5.3-1_s390x.deb ... 259s Unpacking libdav1d7:s390x (1.5.3-1) ... 259s Selecting previously unselected package libjpeg-turbo8:s390x. 259s Preparing to unpack .../061-libjpeg-turbo8_2.1.5-4ubuntu2_s390x.deb ... 259s Unpacking libjpeg-turbo8:s390x (2.1.5-4ubuntu2) ... 259s Selecting previously unselected package libjpeg8:s390x. 259s Preparing to unpack .../062-libjpeg8_8c-2ubuntu11_s390x.deb ... 259s Unpacking libjpeg8:s390x (8c-2ubuntu11) ... 259s Selecting previously unselected package libyuv0:s390x. 260s Preparing to unpack .../063-libyuv0_0.0.1922.20260106-1_s390x.deb ... 260s Unpacking libyuv0:s390x (0.0.1922.20260106-1) ... 260s Selecting previously unselected package libavif16:s390x. 260s Preparing to unpack .../064-libavif16_1.3.0-1ubuntu3_s390x.deb ... 260s Unpacking libavif16:s390x (1.3.0-1ubuntu3) ... 260s Selecting previously unselected package libsnappy1v5:s390x. 260s Preparing to unpack .../065-libsnappy1v5_1.2.2-2_s390x.deb ... 260s Unpacking libsnappy1v5:s390x (1.2.2-2) ... 260s Selecting previously unselected package libblosc1:s390x. 260s Preparing to unpack .../066-libblosc1_1.21.5+ds-2_s390x.deb ... 260s Unpacking libblosc1:s390x (1.21.5+ds-2) ... 260s Selecting previously unselected package libcfitsio10t64:s390x. 260s Preparing to unpack .../067-libcfitsio10t64_4.6.3-1_s390x.deb ... 260s Unpacking libcfitsio10t64:s390x (4.6.3-1) ... 260s Selecting previously unselected package libde265-0:s390x. 260s Preparing to unpack .../068-libde265-0_1.0.16-1build1_s390x.deb ... 260s Unpacking libde265-0:s390x (1.0.16-1build1) ... 260s Selecting previously unselected package libdeflate0:s390x. 260s Preparing to unpack .../069-libdeflate0_1.23-2_s390x.deb ... 260s Unpacking libdeflate0:s390x (1.23-2) ... 260s Selecting previously unselected package libfreetype6:s390x. 260s Preparing to unpack .../070-libfreetype6_2.14.1+dfsg-2_s390x.deb ... 260s Unpacking libfreetype6:s390x (2.14.1+dfsg-2) ... 260s Selecting previously unselected package libfontconfig1:s390x. 260s Preparing to unpack .../071-libfontconfig1_2.15.0-2.4ubuntu1_s390x.deb ... 260s Unpacking libfontconfig1:s390x (2.15.0-2.4ubuntu1) ... 260s Selecting previously unselected package libfyba0t64:s390x. 260s Preparing to unpack .../072-libfyba0t64_4.1.1-11build2_s390x.deb ... 260s Unpacking libfyba0t64:s390x (4.1.1-11build2) ... 260s Selecting previously unselected package libminizip1t64:s390x. 260s Preparing to unpack .../073-libminizip1t64_1%3a1.3.dfsg+really1.3.1-1ubuntu2_s390x.deb ... 260s Unpacking libminizip1t64:s390x (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 260s Selecting previously unselected package libfreexl1:s390x. 260s Preparing to unpack .../074-libfreexl1_2.0.0-1build3_s390x.deb ... 260s Unpacking libfreexl1:s390x (2.0.0-1build3) ... 261s Selecting previously unselected package libgeos3.14.1:s390x. 261s Preparing to unpack .../075-libgeos3.14.1_3.14.1-2_s390x.deb ... 261s Unpacking libgeos3.14.1:s390x (3.14.1-2) ... 261s Selecting previously unselected package libgeos-c1t64:s390x. 261s Preparing to unpack .../076-libgeos-c1t64_3.14.1-2_s390x.deb ... 261s Unpacking libgeos-c1t64:s390x (3.14.1-2) ... 261s Selecting previously unselected package proj-data. 261s Preparing to unpack .../077-proj-data_9.7.1-1_all.deb ... 261s Unpacking proj-data (9.7.1-1) ... 262s Selecting previously unselected package libjbig0:s390x. 262s Preparing to unpack .../078-libjbig0_2.1-6.1ubuntu3_s390x.deb ... 262s Unpacking libjbig0:s390x (2.1-6.1ubuntu3) ... 262s Selecting previously unselected package libsharpyuv0:s390x. 262s Preparing to unpack .../079-libsharpyuv0_1.5.0-0.1build1_s390x.deb ... 262s Unpacking libsharpyuv0:s390x (1.5.0-0.1build1) ... 262s Selecting previously unselected package libwebp7:s390x. 262s Preparing to unpack .../080-libwebp7_1.5.0-0.1build1_s390x.deb ... 262s Unpacking libwebp7:s390x (1.5.0-0.1build1) ... 262s Selecting previously unselected package libtiff6:s390x. 262s Preparing to unpack .../081-libtiff6_4.7.0-3ubuntu3_s390x.deb ... 262s Unpacking libtiff6:s390x (4.7.0-3ubuntu3) ... 262s Selecting previously unselected package libproj25:s390x. 262s Preparing to unpack .../082-libproj25_9.7.1-1_s390x.deb ... 262s Unpacking libproj25:s390x (9.7.1-1) ... 262s Selecting previously unselected package libgeotiff5:s390x. 262s Preparing to unpack .../083-libgeotiff5_1.7.4-1_s390x.deb ... 262s Unpacking libgeotiff5:s390x (1.7.4-1) ... 262s Selecting previously unselected package libgif7:s390x. 262s Preparing to unpack .../084-libgif7_5.2.2-1ubuntu3_s390x.deb ... 262s Unpacking libgif7:s390x (5.2.2-1ubuntu3) ... 262s Selecting previously unselected package libsz2:s390x. 262s Preparing to unpack .../085-libsz2_1.1.4-2_s390x.deb ... 262s Unpacking libsz2:s390x (1.1.4-2) ... 262s Selecting previously unselected package libhdf4-0-alt:s390x. 262s Preparing to unpack .../086-libhdf4-0-alt_4.3.0-1_s390x.deb ... 262s Unpacking libhdf4-0-alt:s390x (4.3.0-1) ... 262s Selecting previously unselected package libhdf5-310:s390x. 262s Preparing to unpack .../087-libhdf5-310_1.14.6+repack-2_s390x.deb ... 262s Unpacking libhdf5-310:s390x (1.14.6+repack-2) ... 262s Selecting previously unselected package libheif-plugin-aomdec:s390x. 262s Preparing to unpack .../088-libheif-plugin-aomdec_1.21.2-1_s390x.deb ... 262s Unpacking libheif-plugin-aomdec:s390x (1.21.2-1) ... 262s Selecting previously unselected package libheif-plugin-libde265:s390x. 262s Preparing to unpack .../089-libheif-plugin-libde265_1.21.2-1_s390x.deb ... 262s Unpacking libheif-plugin-libde265:s390x (1.21.2-1) ... 262s Selecting previously unselected package libheif1:s390x. 262s Preparing to unpack .../090-libheif1_1.21.2-1_s390x.deb ... 262s Unpacking libheif1:s390x (1.21.2-1) ... 262s Selecting previously unselected package liburiparser1:s390x. 262s Preparing to unpack .../091-liburiparser1_0.9.8+dfsg-2_s390x.deb ... 262s Unpacking liburiparser1:s390x (0.9.8+dfsg-2) ... 262s Selecting previously unselected package libkmlbase1t64:s390x. 262s Preparing to unpack .../092-libkmlbase1t64_1.3.0-13_s390x.deb ... 262s Unpacking libkmlbase1t64:s390x (1.3.0-13) ... 263s Selecting previously unselected package libkmldom1t64:s390x. 263s Preparing to unpack .../093-libkmldom1t64_1.3.0-13_s390x.deb ... 263s Unpacking libkmldom1t64:s390x (1.3.0-13) ... 263s Selecting previously unselected package libkmlengine1t64:s390x. 263s Preparing to unpack .../094-libkmlengine1t64_1.3.0-13_s390x.deb ... 263s Unpacking libkmlengine1t64:s390x (1.3.0-13) ... 263s Selecting previously unselected package mysql-common. 263s Preparing to unpack .../095-mysql-common_5.8+1.1.1ubuntu2_all.deb ... 263s Unpacking mysql-common (5.8+1.1.1ubuntu2) ... 263s Selecting previously unselected package libmysqlclient24:s390x. 263s Preparing to unpack .../096-libmysqlclient24_8.4.7-0ubuntu3_s390x.deb ... 263s Unpacking libmysqlclient24:s390x (8.4.7-0ubuntu3) ... 263s Selecting previously unselected package libhdf5-hl-310:s390x. 263s Preparing to unpack .../097-libhdf5-hl-310_1.14.6+repack-2_s390x.deb ... 263s Unpacking libhdf5-hl-310:s390x (1.14.6+repack-2) ... 263s Selecting previously unselected package libnetcdf22:s390x. 263s Preparing to unpack .../098-libnetcdf22_1%3a4.9.3-1build1_s390x.deb ... 263s Unpacking libnetcdf22:s390x (1:4.9.3-1build1) ... 263s Selecting previously unselected package libltdl7:s390x. 263s Preparing to unpack .../099-libltdl7_2.5.4-9_s390x.deb ... 263s Unpacking libltdl7:s390x (2.5.4-9) ... 263s Selecting previously unselected package libodbc2:s390x. 263s Preparing to unpack .../100-libodbc2_2.3.14-1_s390x.deb ... 263s Unpacking libodbc2:s390x (2.3.14-1) ... 264s Selecting previously unselected package unixodbc-common. 264s Preparing to unpack .../101-unixodbc-common_2.3.14-1_all.deb ... 264s Unpacking unixodbc-common (2.3.14-1) ... 264s Selecting previously unselected package libodbcinst2:s390x. 264s Preparing to unpack .../102-libodbcinst2_2.3.14-1_s390x.deb ... 264s Unpacking libodbcinst2:s390x (2.3.14-1) ... 264s Selecting previously unselected package libogdi4.1:s390x. 264s Preparing to unpack .../103-libogdi4.1_4.1.1+ds-5_s390x.deb ... 264s Unpacking libogdi4.1:s390x (4.1.1+ds-5) ... 264s Selecting previously unselected package libopenjp2-7:s390x. 264s Preparing to unpack .../104-libopenjp2-7_2.5.4-1_s390x.deb ... 264s Unpacking libopenjp2-7:s390x (2.5.4-1) ... 264s Selecting previously unselected package libgpgmepp6t64:s390x. 264s Preparing to unpack .../105-libgpgmepp6t64_1.24.2-3ubuntu2_s390x.deb ... 264s Unpacking libgpgmepp6t64:s390x (1.24.2-3ubuntu2) ... 264s Selecting previously unselected package liblcms2-2:s390x. 264s Preparing to unpack .../106-liblcms2-2_2.17-1_s390x.deb ... 264s Unpacking liblcms2-2:s390x (2.17-1) ... 264s Selecting previously unselected package libpoppler147:s390x. 264s Preparing to unpack .../107-libpoppler147_25.03.0-11.1_s390x.deb ... 264s Unpacking libpoppler147:s390x (25.03.0-11.1) ... 264s Selecting previously unselected package libpq5:s390x. 264s Preparing to unpack .../108-libpq5_18.1-2_s390x.deb ... 264s Unpacking libpq5:s390x (18.1-2) ... 264s Selecting previously unselected package libqhull-r8.0:s390x. 264s Preparing to unpack .../109-libqhull-r8.0_2020.2-8_s390x.deb ... 264s Unpacking libqhull-r8.0:s390x (2020.2-8) ... 264s Selecting previously unselected package librttopo1:s390x. 264s Preparing to unpack .../110-librttopo1_1.1.0-4_s390x.deb ... 264s Unpacking librttopo1:s390x (1.1.0-4) ... 264s Selecting previously unselected package libspatialite8t64:s390x. 264s Preparing to unpack .../111-libspatialite8t64_5.1.0-3ubuntu1_s390x.deb ... 264s Unpacking libspatialite8t64:s390x (5.1.0-3ubuntu1) ... 264s Selecting previously unselected package libxerces-c3.2t64:s390x. 264s Preparing to unpack .../112-libxerces-c3.2t64_3.2.4+debian-1.3build2_s390x.deb ... 264s Unpacking libxerces-c3.2t64:s390x (3.2.4+debian-1.3build2) ... 265s Selecting previously unselected package libgdal36:s390x. 265s Preparing to unpack .../113-libgdal36_3.10.3+dfsg-1build3_s390x.deb ... 265s Unpacking libgdal36:s390x (3.10.3+dfsg-1build3) ... 267s Selecting previously unselected package libjson-perl. 267s Preparing to unpack .../114-libjson-perl_4.10000-1_all.deb ... 267s Unpacking libjson-perl (4.10000-1) ... 267s Selecting previously unselected package liblua5.4-0:s390x. 267s Preparing to unpack .../115-liblua5.4-0_5.4.8-1_s390x.deb ... 267s Unpacking liblua5.4-0:s390x (5.4.8-1) ... 267s Selecting previously unselected package libnorm1t64:s390x. 267s Preparing to unpack .../116-libnorm1t64_1.5.9+dfsg-4_s390x.deb ... 267s Unpacking libnorm1t64:s390x (1.5.9+dfsg-4) ... 267s Selecting previously unselected package libpgm-5.3-0t64:s390x. 267s Preparing to unpack .../117-libpgm-5.3-0t64_5.3.128~dfsg-2.1build2_s390x.deb ... 267s Unpacking libpgm-5.3-0t64:s390x (5.3.128~dfsg-2.1build2) ... 267s Selecting previously unselected package libsodium23:s390x. 267s Preparing to unpack .../118-libsodium23_1.0.18-2_s390x.deb ... 267s Unpacking libsodium23:s390x (1.0.18-2) ... 267s Selecting previously unselected package libzmq5:s390x. 267s Preparing to unpack .../119-libzmq5_4.3.5-1build3_s390x.deb ... 267s Unpacking libzmq5:s390x (4.3.5-1build3) ... 267s Selecting previously unselected package node-fortawesome-fontawesome-free. 267s Preparing to unpack .../120-node-fortawesome-fontawesome-free_6.7.2+ds1-1_all.deb ... 267s Unpacking node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 268s Selecting previously unselected package pandoc-data. 268s Preparing to unpack .../121-pandoc-data_3.1.11.1-3build1_all.deb ... 268s Unpacking pandoc-data (3.1.11.1-3build1) ... 268s Selecting previously unselected package pandoc. 268s Preparing to unpack .../122-pandoc_3.1.11.1+ds-4_s390x.deb ... 268s Unpacking pandoc (3.1.11.1+ds-4) ... 277s Selecting previously unselected package pybuild-plugin-autopkgtest. 277s Preparing to unpack .../123-pybuild-plugin-autopkgtest_7.20251231_all.deb ... 277s Unpacking pybuild-plugin-autopkgtest (7.20251231) ... 277s Selecting previously unselected package python3-pyproject-hooks. 277s Preparing to unpack .../124-python3-pyproject-hooks_1.2.0-1_all.deb ... 277s Unpacking python3-pyproject-hooks (1.2.0-1) ... 277s Selecting previously unselected package python3-wheel. 277s Preparing to unpack .../125-python3-wheel_0.46.1-2_all.deb ... 277s Unpacking python3-wheel (0.46.1-2) ... 277s Selecting previously unselected package python3-build. 277s Preparing to unpack .../126-python3-build_1.2.2-5_all.deb ... 277s Unpacking python3-build (1.2.2-5) ... 277s Selecting previously unselected package python3-installer. 277s Preparing to unpack .../127-python3-installer_0.7.0+dfsg1-3_all.deb ... 277s Unpacking python3-installer (0.7.0+dfsg1-3) ... 277s Selecting previously unselected package pybuild-plugin-pyproject. 277s Preparing to unpack .../128-pybuild-plugin-pyproject_7.20251231_all.deb ... 277s Unpacking pybuild-plugin-pyproject (7.20251231) ... 277s Selecting previously unselected package python-pystac-doc. 277s Preparing to unpack .../129-python-pystac-doc_1.14.3-1_all.deb ... 277s Unpacking python-pystac-doc (1.14.3-1) ... 277s Selecting previously unselected package python-tinycss2-common. 277s Preparing to unpack .../130-python-tinycss2-common_1.5.1-1_all.deb ... 277s Unpacking python-tinycss2-common (1.5.1-1) ... 277s Selecting previously unselected package python3-accessible-pygments. 277s Preparing to unpack .../131-python3-accessible-pygments_0.0.5-2build1_all.deb ... 277s Unpacking python3-accessible-pygments (0.0.5-2build1) ... 277s Selecting previously unselected package python3-affine. 277s Preparing to unpack .../132-python3-affine_2.4.0-2_all.deb ... 277s Unpacking python3-affine (2.4.0-2) ... 277s Selecting previously unselected package python3-all. 277s Preparing to unpack .../133-python3-all_3.14.2-1_s390x.deb ... 277s Unpacking python3-all (3.14.2-1) ... 277s Selecting previously unselected package python3-sniffio. 277s Preparing to unpack .../134-python3-sniffio_1.3.1-1_all.deb ... 277s Unpacking python3-sniffio (1.3.1-1) ... 277s Selecting previously unselected package python3-anyio. 277s Preparing to unpack .../135-python3-anyio_4.11.0-3_all.deb ... 277s Unpacking python3-anyio (4.11.0-3) ... 277s Selecting previously unselected package python3-astroid. 277s Preparing to unpack .../136-python3-astroid_4.0.2-1ubuntu1_all.deb ... 277s Unpacking python3-astroid (4.0.2-1ubuntu1) ... 278s Selecting previously unselected package python3-asttokens. 278s Preparing to unpack .../137-python3-asttokens_3.0.1-1_all.deb ... 278s Unpacking python3-asttokens (3.0.1-1) ... 278s Selecting previously unselected package python3-webencodings. 278s Preparing to unpack .../138-python3-webencodings_0.5.1-5build1_all.deb ... 278s Unpacking python3-webencodings (0.5.1-5build1) ... 278s Selecting previously unselected package python3-html5lib. 278s Preparing to unpack .../139-python3-html5lib_1.2-3_all.deb ... 278s Unpacking python3-html5lib (1.2-3) ... 278s Selecting previously unselected package python3-bleach. 278s Preparing to unpack .../140-python3-bleach_6.3.0-1_all.deb ... 278s Unpacking python3-bleach (6.3.0-1) ... 278s Selecting previously unselected package python3-soupsieve. 278s Preparing to unpack .../141-python3-soupsieve_2.8.1-1_all.deb ... 278s Unpacking python3-soupsieve (2.8.1-1) ... 278s Selecting previously unselected package python3-bs4. 278s Preparing to unpack .../142-python3-bs4_4.14.3-2build1_all.deb ... 278s Unpacking python3-bs4 (4.14.3-2build1) ... 278s Selecting previously unselected package python3-click. 278s Preparing to unpack .../143-python3-click_8.2.0+0.really.8.1.8-1build1_all.deb ... 278s Unpacking python3-click (8.2.0+0.really.8.1.8-1build1) ... 278s Selecting previously unselected package python3-click-plugins. 278s Preparing to unpack .../144-python3-click-plugins_1.1.1-5_all.deb ... 278s Unpacking python3-click-plugins (1.1.1-5) ... 278s Selecting previously unselected package python3-cligj. 278s Preparing to unpack .../145-python3-cligj_0.7.2-3_all.deb ... 278s Unpacking python3-cligj (0.7.2-3) ... 278s Selecting previously unselected package python3-colorama. 278s Preparing to unpack .../146-python3-colorama_0.4.6-4build1_all.deb ... 278s Unpacking python3-colorama (0.4.6-4build1) ... 278s Selecting previously unselected package python3-decorator. 278s Preparing to unpack .../147-python3-decorator_5.2.1-2_all.deb ... 278s Unpacking python3-decorator (5.2.1-2) ... 278s Selecting previously unselected package python3-defusedxml. 278s Preparing to unpack .../148-python3-defusedxml_0.7.1-3build1_all.deb ... 278s Unpacking python3-defusedxml (0.7.1-3build1) ... 278s Selecting previously unselected package python3-roman-numerals. 278s Preparing to unpack .../149-python3-roman-numerals_4.1.0-1_all.deb ... 278s Unpacking python3-roman-numerals (4.1.0-1) ... 278s Selecting previously unselected package python3-docutils. 278s Preparing to unpack .../150-python3-docutils_0.22.4+dfsg-1_all.deb ... 278s Unpacking python3-docutils (0.22.4+dfsg-1) ... 279s Selecting previously unselected package python3-executing. 279s Preparing to unpack .../151-python3-executing_2.2.1-0.1_all.deb ... 279s Unpacking python3-executing (2.2.1-0.1) ... 279s Selecting previously unselected package python3-fastjsonschema. 279s Preparing to unpack .../152-python3-fastjsonschema_2.21.1-1_all.deb ... 279s Unpacking python3-fastjsonschema (2.21.1-1) ... 279s Selecting previously unselected package python3-h11. 279s Preparing to unpack .../153-python3-h11_0.14.0-1.1_all.deb ... 279s Unpacking python3-h11 (0.14.0-1.1) ... 279s Selecting previously unselected package python3-imagesize. 279s Preparing to unpack .../154-python3-imagesize_1.4.1-1build1_all.deb ... 279s Unpacking python3-imagesize (1.4.1-1build1) ... 279s Selecting previously unselected package python3-iniconfig. 279s Preparing to unpack .../155-python3-iniconfig_2.1.0-2_all.deb ... 279s Unpacking python3-iniconfig (2.1.0-2) ... 279s Selecting previously unselected package python3-parso. 279s Preparing to unpack .../156-python3-parso_0.8.5-1_all.deb ... 279s Unpacking python3-parso (0.8.5-1) ... 279s Selecting previously unselected package python3-typeshed. 279s Preparing to unpack .../157-python3-typeshed_0.0~git20241223.ea91db2-4_all.deb ... 279s Unpacking python3-typeshed (0.0~git20241223.ea91db2-4) ... 280s Selecting previously unselected package python3-jedi. 280s Preparing to unpack .../158-python3-jedi_0.19.1+ds1-1build1_all.deb ... 280s Unpacking python3-jedi (0.19.1+ds1-1build1) ... 281s Selecting previously unselected package python3-traitlets. 281s Preparing to unpack .../159-python3-traitlets_5.14.3+really5.14.3-2_all.deb ... 281s Unpacking python3-traitlets (5.14.3+really5.14.3-2) ... 281s Selecting previously unselected package python3-matplotlib-inline. 281s Preparing to unpack .../160-python3-matplotlib-inline_0.2.1-1_all.deb ... 281s Unpacking python3-matplotlib-inline (0.2.1-1) ... 281s Selecting previously unselected package python3-wcwidth. 281s Preparing to unpack .../161-python3-wcwidth_0.2.14+dfsg1-1build1_all.deb ... 281s Unpacking python3-wcwidth (0.2.14+dfsg1-1build1) ... 281s Selecting previously unselected package python3-prompt-toolkit. 281s Preparing to unpack .../162-python3-prompt-toolkit_3.0.52-2_all.deb ... 281s Unpacking python3-prompt-toolkit (3.0.52-2) ... 281s Selecting previously unselected package python3-pure-eval. 281s Preparing to unpack .../163-python3-pure-eval_0.2.3-1_all.deb ... 281s Unpacking python3-pure-eval (0.2.3-1) ... 281s Selecting previously unselected package python3-stack-data. 281s Preparing to unpack .../164-python3-stack-data_0.6.3-3_all.deb ... 281s Unpacking python3-stack-data (0.6.3-3) ... 281s Selecting previously unselected package python3-ipython. 281s Preparing to unpack .../165-python3-ipython_8.35.0-2_all.deb ... 281s Unpacking python3-ipython (8.35.0-2) ... 281s Selecting previously unselected package python3-platformdirs. 281s Preparing to unpack .../166-python3-platformdirs_4.5.1-1_all.deb ... 281s Unpacking python3-platformdirs (4.5.1-1) ... 281s Selecting previously unselected package python3-jupyter-core. 281s Preparing to unpack .../167-python3-jupyter-core_5.9.1-1_all.deb ... 281s Unpacking python3-jupyter-core (5.9.1-1) ... 281s Selecting previously unselected package python3-psutil. 281s Preparing to unpack .../168-python3-psutil_7.1.0-1ubuntu1_s390x.deb ... 281s Unpacking python3-psutil (7.1.0-1ubuntu1) ... 282s Selecting previously unselected package python3-tornado. 282s Preparing to unpack .../169-python3-tornado_6.5.4-0.1_s390x.deb ... 282s Unpacking python3-tornado (6.5.4-0.1) ... 282s Selecting previously unselected package python3-zmq. 282s Preparing to unpack .../170-python3-zmq_27.1.0-1_s390x.deb ... 282s Unpacking python3-zmq (27.1.0-1) ... 282s Selecting previously unselected package python3-jupyter-client. 282s Preparing to unpack .../171-python3-jupyter-client_8.7.0-1_all.deb ... 282s Unpacking python3-jupyter-client (8.7.0-1) ... 282s Selecting previously unselected package python3-jupyterlab-pygments. 282s Preparing to unpack .../172-python3-jupyterlab-pygments_0.2.2-3build1_all.deb ... 282s Unpacking python3-jupyterlab-pygments (0.2.2-3build1) ... 282s Selecting previously unselected package python3-livereload. 282s Preparing to unpack .../173-python3-livereload_2.7.1-0.1_all.deb ... 282s Unpacking python3-livereload (2.7.1-0.1) ... 282s Selecting previously unselected package python3-mistune. 282s Preparing to unpack .../174-python3-mistune_3.1.4-1_all.deb ... 282s Unpacking python3-mistune (3.1.4-1) ... 282s Selecting previously unselected package python3-multidict. 282s Preparing to unpack .../175-python3-multidict_6.4.3-1build1_s390x.deb ... 282s Unpacking python3-multidict (6.4.3-1build1) ... 282s Selecting previously unselected package python3-nbformat. 282s Preparing to unpack .../176-python3-nbformat_5.10.4-1_all.deb ... 282s Unpacking python3-nbformat (5.10.4-1) ... 283s Selecting previously unselected package python3-nbclient. 283s Preparing to unpack .../177-python3-nbclient_0.10.4-1_all.deb ... 283s Unpacking python3-nbclient (0.10.4-1) ... 283s Selecting previously unselected package python3-tinycss2. 283s Preparing to unpack .../178-python3-tinycss2_1.5.1-1_all.deb ... 283s Unpacking python3-tinycss2 (1.5.1-1) ... 283s Selecting previously unselected package python3-pandocfilters. 283s Preparing to unpack .../179-python3-pandocfilters_1.5.1-1_all.deb ... 283s Unpacking python3-pandocfilters (1.5.1-1) ... 283s Selecting previously unselected package python3-nbconvert. 283s Preparing to unpack .../180-python3-nbconvert_7.16.6-1_all.deb ... 283s Unpacking python3-nbconvert (7.16.6-1) ... 283s Selecting previously unselected package sphinx-common. 283s Preparing to unpack .../181-sphinx-common_8.2.3-12_all.deb ... 283s Unpacking sphinx-common (8.2.3-12) ... 283s Selecting previously unselected package python3-alabaster. 283s Preparing to unpack .../182-python3-alabaster_0.7.16-0.1build1_all.deb ... 283s Unpacking python3-alabaster (0.7.16-0.1build1) ... 283s Selecting previously unselected package python3-snowballstemmer. 283s Preparing to unpack .../183-python3-snowballstemmer_3.0.1-1_all.deb ... 283s Unpacking python3-snowballstemmer (3.0.1-1) ... 283s Selecting previously unselected package python3-sphinx. 283s Preparing to unpack .../184-python3-sphinx_8.2.3-12_all.deb ... 283s Unpacking python3-sphinx (8.2.3-12) ... 284s Selecting previously unselected package python3-nbsphinx. 284s Preparing to unpack .../185-python3-nbsphinx_0.9.5+ds-1_all.deb ... 284s Unpacking python3-nbsphinx (0.9.5+ds-1) ... 284s Selecting previously unselected package python3-pluggy. 284s Preparing to unpack .../186-python3-pluggy_1.6.0-2_all.deb ... 284s Unpacking python3-pluggy (1.6.0-2) ... 284s Selecting previously unselected package python3-propcache. 284s Preparing to unpack .../187-python3-propcache_0.3.1-1build1_s390x.deb ... 284s Unpacking python3-propcache (0.3.1-1build1) ... 284s Selecting previously unselected package python3-pydata-sphinx-theme. 284s Preparing to unpack .../188-python3-pydata-sphinx-theme_0.16.1+dfsg-5_all.deb ... 284s Unpacking python3-pydata-sphinx-theme (0.16.1+dfsg-5) ... 284s Selecting previously unselected package python3-pystac. 284s Preparing to unpack .../189-python3-pystac_1.14.3-1_all.deb ... 284s Unpacking python3-pystac (1.14.3-1) ... 284s Selecting previously unselected package python3-pytest. 284s Preparing to unpack .../190-python3-pytest_9.0.2-2_all.deb ... 284s Unpacking python3-pytest (9.0.2-2) ... 285s Selecting previously unselected package python3-pytest-mock. 285s Preparing to unpack .../191-python3-pytest-mock_3.15.1-1_all.deb ... 285s Unpacking python3-pytest-mock (3.15.1-1) ... 285s Selecting previously unselected package python3-wrapt. 285s Preparing to unpack .../192-python3-wrapt_1.17.3-3_s390x.deb ... 285s Unpacking python3-wrapt (1.17.3-3) ... 285s Selecting previously unselected package python3-yarl. 285s Preparing to unpack .../193-python3-yarl_1.22.0-1_s390x.deb ... 285s Unpacking python3-yarl (1.22.0-1) ... 285s Selecting previously unselected package python3-vcr. 285s Preparing to unpack .../194-python3-vcr_7.0.0-2_all.deb ... 285s Unpacking python3-vcr (7.0.0-2) ... 285s Selecting previously unselected package python3-pytest-recording. 285s Preparing to unpack .../195-python3-pytest-recording_0.13.4-1_all.deb ... 285s Unpacking python3-pytest-recording (0.13.4-1) ... 285s Selecting previously unselected package python3-rasterio. 285s Preparing to unpack .../196-python3-rasterio_1.4.3-2build2_s390x.deb ... 285s Unpacking python3-rasterio (1.4.3-2build2) ... 285s Selecting previously unselected package python3-requests-mock. 285s Preparing to unpack .../197-python3-requests-mock_1.12.1-4_all.deb ... 285s Unpacking python3-requests-mock (1.12.1-4) ... 285s Selecting previously unselected package python3-shapely. 285s Preparing to unpack .../198-python3-shapely_2.1.2-1ubuntu1_s390x.deb ... 285s Unpacking python3-shapely (2.1.2-1ubuntu1) ... 285s Selecting previously unselected package python3-starlette. 285s Preparing to unpack .../199-python3-starlette_0.50.0-1_all.deb ... 285s Unpacking python3-starlette (0.50.0-1) ... 285s Selecting previously unselected package python3-uvloop. 285s Preparing to unpack .../200-python3-uvloop_0.22.1+ds1-2_s390x.deb ... 285s Unpacking python3-uvloop (0.22.1+ds1-2) ... 286s Selecting previously unselected package python3-wsproto. 286s Preparing to unpack .../201-python3-wsproto_1.3.2-1_all.deb ... 286s Unpacking python3-wsproto (1.3.2-1) ... 286s Selecting previously unselected package python3-uvicorn. 286s Preparing to unpack .../202-python3-uvicorn_0.38.0-1_all.deb ... 286s Unpacking python3-uvicorn (0.38.0-1) ... 286s Selecting previously unselected package python3-watchfiles. 286s Preparing to unpack .../203-python3-watchfiles_1.1.1-2_s390x.deb ... 286s Unpacking python3-watchfiles (1.1.1-2) ... 286s Selecting previously unselected package python3-websockets. 286s Preparing to unpack .../204-python3-websockets_15.0.1-1build1_s390x.deb ... 286s Unpacking python3-websockets (15.0.1-1build1) ... 286s Selecting previously unselected package python3-sphinx-autobuild. 286s Preparing to unpack .../205-python3-sphinx-autobuild_2025.08.25-1_all.deb ... 286s Unpacking python3-sphinx-autobuild (2025.08.25-1) ... 286s Selecting previously unselected package python3-sphinx-design. 286s Preparing to unpack .../206-python3-sphinx-design_0.7.0-1_all.deb ... 286s Unpacking python3-sphinx-design (0.7.0-1) ... 286s Selecting previously unselected package libjs-mathjax. 286s Preparing to unpack .../207-libjs-mathjax_2.7.9+dfsg-1build1_all.deb ... 286s Unpacking libjs-mathjax (2.7.9+dfsg-1build1) ... 288s Setting up dh-python (7.20251231) ... 290s Setting up liblcms2-2:s390x (2.17-1) ... 290s Setting up python3-iniconfig (2.1.0-2) ... 291s Setting up python3-sniffio (1.3.1-1) ... 292s Setting up python3-tornado (6.5.4-0.1) ... 294s Setting up libnorm1t64:s390x (1.5.9+dfsg-4) ... 294s Setting up libsharpyuv0:s390x (1.5.0-0.1build1) ... 294s Setting up libgpgmepp6t64:s390x (1.24.2-3ubuntu2) ... 295s Setting up libaom3:s390x (3.13.1-2) ... 295s Setting up mysql-common (5.8+1.1.1ubuntu2) ... 295s update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode 295s Setting up python3-pure-eval (0.2.3-1) ... 296s Setting up fonts-mathjax (2.7.9+dfsg-1build1) ... 296s Setting up libsodium23:s390x (1.0.18-2) ... 296s Setting up proj-data (9.7.1-1) ... 296s Setting up python-pystac-doc (1.14.3-1) ... 296s Setting up libjs-mathjax (2.7.9+dfsg-1build1) ... 296s Setting up python3-anyio (4.11.0-3) ... 297s Setting up python3-parso (0.8.5-1) ... 298s Setting up libogdi4.1:s390x (4.1.1+ds-5) ... 298s Setting up python3-colorama (0.4.6-4build1) ... 298s Setting up python3-defusedxml (0.7.1-3build1) ... 299s Setting up libarchive-zip-perl (1.68-1) ... 299s Setting up python3-alabaster (0.7.16-0.1build1) ... 299s Setting up libdebhelper-perl (13.28ubuntu1) ... 299s Setting up libpq5:s390x (18.1-2) ... 299s Setting up libdeflate0:s390x (1.23-2) ... 299s Setting up m4 (1.4.20-2) ... 299s Setting up python3-watchfiles (1.1.1-2) ... 300s Setting up libqhull-r8.0:s390x (2020.2-8) ... 300s Setting up node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 300s Setting up python3-starlette (0.50.0-1) ... 301s Setting up python3-pandocfilters (1.5.1-1) ... 302s Setting up libxerces-c3.2t64:s390x (3.2.4+debian-1.3build2) ... 302s Setting up libgomp1:s390x (15.2.0-11ubuntu1) ... 302s Setting up python3-click (8.2.0+0.really.8.1.8-1build1) ... 303s Setting up libmysqlclient24:s390x (8.4.7-0ubuntu3) ... 303s Setting up python3-wheel (0.46.1-2) ... 303s Setting up libjbig0:s390x (2.1-6.1ubuntu3) ... 303s Setting up python3-webencodings (0.5.1-5build1) ... 304s Setting up libaec0:s390x (1.1.4-2) ... 304s Setting up python3-platformdirs (4.5.1-1) ... 305s Setting up python3-psutil (7.1.0-1ubuntu1) ... 306s Setting up gdal-data (3.12.1+dfsg-1) ... 306s Setting up python3-multidict (6.4.3-1build1) ... 307s Setting up libsnappy1v5:s390x (1.2.2-2) ... 307s Setting up python3-jupyterlab-pygments (0.2.2-3build1) ... 307s Setting up libpgm-5.3-0t64:s390x (5.3.128~dfsg-2.1build2) ... 307s Setting up python3-decorator (5.2.1-2) ... 308s Setting up autotools-dev (20240727.1) ... 308s Setting up libblas3:s390x (3.12.1-7ubuntu1) ... 308s update-alternatives: using /usr/lib/s390x-linux-gnu/blas/libblas.so.3 to provide /usr/lib/s390x-linux-gnu/libblas.so.3 (libblas.so.3-s390x-linux-gnu) in auto mode 308s Setting up libcfitsio10t64:s390x (4.6.3-1) ... 308s Setting up python3-wcwidth (0.2.14+dfsg1-1build1) ... 309s Setting up python3-pyproject-hooks (1.2.0-1) ... 309s Setting up libfreetype6:s390x (2.14.1+dfsg-2) ... 309s Setting up python3-accessible-pygments (0.0.5-2build1) ... 310s Setting up python3-typeshed (0.0~git20241223.ea91db2-4) ... 310s Setting up python3-snowballstemmer (3.0.1-1) ... 312s Setting up python3-requests-mock (1.12.1-4) ... 313s Setting up fonts-dejavu-mono (2.37-8build1) ... 313s Setting up libmpc3:s390x (1.3.1-2) ... 313s Setting up python3-numpy-dev:s390x (1:2.3.5+ds-3) ... 313s Setting up python3-wrapt (1.17.3-3) ... 315s Setting up python3-h11 (0.14.0-1.1) ... 316s Setting up autopoint (0.23.2-1) ... 316s Setting up python3-click-plugins (1.1.1-5) ... 317s Setting up fonts-dejavu-core (2.37-8build1) ... 317s Setting up unixodbc-common (2.3.14-1) ... 317s Setting up libjpeg-turbo8:s390x (2.1.5-4ubuntu2) ... 317s Setting up python3-html5lib (1.2-3) ... 318s Setting up libltdl7:s390x (2.5.4-9) ... 318s Setting up python3-uvloop (0.22.1+ds1-2) ... 318s Setting up python3-installer (0.7.0+dfsg1-3) ... 319s Setting up libgfortran5:s390x (15.2.0-11ubuntu1) ... 319s Setting up autoconf (2.72-3.1ubuntu1) ... 319s Setting up python3-pluggy (1.6.0-2) ... 320s Setting up libwebp7:s390x (1.5.0-0.1build1) ... 320s Setting up libubsan1:s390x (15.2.0-11ubuntu1) ... 320s Setting up python3-fastjsonschema (2.21.1-1) ... 320s Setting up libgif7:s390x (5.2.2-1ubuntu3) ... 320s Setting up libodbc2:s390x (2.3.14-1) ... 320s Setting up libgeos3.14.1:s390x (3.14.1-2) ... 320s Setting up liburiparser1:s390x (0.9.8+dfsg-2) ... 320s Setting up libfyba0t64:s390x (4.1.1-11build2) ... 320s Setting up dwz (0.16-2) ... 320s Setting up libdav1d7:s390x (1.5.3-1) ... 320s Setting up libminizip1t64:s390x (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 320s Setting up python3-astroid (4.0.2-1ubuntu1) ... 322s Setting up python3-livereload (2.7.1-0.1) ... 323s Setting up python3-propcache (0.3.1-1build1) ... 323s Setting up python3-traitlets (5.14.3+really5.14.3-2) ... 324s Setting up libasan8:s390x (15.2.0-11ubuntu1) ... 324s Setting up python-tinycss2-common (1.5.1-1) ... 324s Setting up libjson-perl (4.10000-1) ... 324s Setting up libblosc1:s390x (1.21.5+ds-2) ... 324s Setting up debugedit (1:5.2-3) ... 324s Setting up python3-roman-numerals (4.1.0-1) ... 325s Setting up liblua5.4-0:s390x (5.4.8-1) ... 325s Setting up libopenjp2-7:s390x (2.5.4-1) ... 325s Setting up python3.13-minimal (3.13.11-1) ... 328s Setting up sgml-base (1.31+nmu1) ... 329s Setting up pandoc-data (3.1.11.1-3build1) ... 329s Setting up libisl23:s390x (0.27-1build1) ... 329s Setting up python3-affine (2.4.0-2) ... 330s Setting up python3-build (1.2.2-5) ... 331s Setting up libde265-0:s390x (1.0.16-1build1) ... 331s Setting up libkmlbase1t64:s390x (1.3.0-13) ... 331s Setting up python3-yarl (1.22.0-1) ... 331s Setting up python3-mistune (3.1.4-1) ... 333s Setting up python3-soupsieve (2.8.1-1) ... 334s Setting up libcc1-0:s390x (15.2.0-11ubuntu1) ... 334s Setting up python3-jupyter-core (5.9.1-1) ... 335s Setting up libsz2:s390x (1.1.4-2) ... 335s Setting up libitm1:s390x (15.2.0-11ubuntu1) ... 336s Setting up python3-imagesize (1.4.1-1build1) ... 336s Setting up gdal-plugins:s390x (3.12.1+dfsg-1) ... 336s Setting up python3-websockets (15.0.1-1build1) ... 337s Setting up python3-pystac (1.14.3-1) ... 340s Setting up libjpeg8:s390x (8c-2ubuntu11) ... 340s Setting up automake (1:1.18.1-3build1) ... 340s update-alternatives: using /usr/bin/automake-1.18 to provide /usr/bin/automake (automake) in auto mode 340s Setting up python3-prompt-toolkit (3.0.52-2) ... 343s Setting up libfile-stripnondeterminism-perl (1.15.0-1build1) ... 343s Setting up libodbcinst2:s390x (2.3.14-1) ... 343s Setting up liblapack3:s390x (3.12.1-7ubuntu1) ... 343s update-alternatives: using /usr/lib/s390x-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/s390x-linux-gnu/liblapack.so.3 (liblapack.so.3-s390x-linux-gnu) in auto mode 343s Setting up gettext (0.23.2-1) ... 343s Setting up libarpack2t64:s390x (3.9.1-6) ... 343s Setting up python3-tinycss2 (1.5.1-1) ... 344s Setting up libgcc-15-dev:s390x (15.2.0-11ubuntu1) ... 344s Setting up libzmq5:s390x (4.3.5-1build3) ... 344s Setting up python3-wsproto (1.3.2-1) ... 346s Setting up python3-jedi (0.19.1+ds1-1build1) ... 348s Setting up python3.13 (3.13.11-1) ... 353s Setting up python3-asttokens (3.0.1-1) ... 354s Setting up pybuild-plugin-pyproject (7.20251231) ... 354s Setting up fontconfig-config (2.15.0-2.4ubuntu1) ... 355s Setting up python3-pytest (9.0.2-2) ... 359s Setting up libgeos-c1t64:s390x (3.14.1-2) ... 359s Setting up python3-cligj (0.7.2-3) ... 360s Setting up python3-all (3.14.2-1) ... 360s Setting up python3-nbformat (5.10.4-1) ... 361s Setting up python3-bs4 (4.14.3-2build1) ... 362s Setting up intltool-debian (0.35.0+20060710.6build1) ... 362s Setting up python3-bleach (6.3.0-1) ... 363s Setting up python3-matplotlib-inline (0.2.1-1) ... 364s Setting up libkmldom1t64:s390x (1.3.0-13) ... 364s Setting up libstdc++-15-dev:s390x (15.2.0-11ubuntu1) ... 364s Setting up pandoc (3.1.11.1+ds-4) ... 364s Setting up python3-executing (2.2.1-0.1) ... 365s Setting up python3-zmq (27.1.0-1) ... 366s Setting up sphinx-common (8.2.3-12) ... 366s Setting up python3-vcr (7.0.0-2) ... 367s Setting up python3-numpy (1:2.3.5+ds-3) ... 386s Setting up libhdf4-0-alt:s390x (4.3.0-1) ... 386s Setting up dh-strip-nondeterminism (1.15.0-1build1) ... 386s Setting up librttopo1:s390x (1.1.0-4) ... 386s Setting up libhdf5-310:s390x (1.14.6+repack-2) ... 386s Setting up libfreexl1:s390x (2.0.0-1build3) ... 386s Setting up python3-pytest-mock (3.15.1-1) ... 386s Setting up libtiff6:s390x (4.7.0-3ubuntu3) ... 386s Setting up xml-core (0.19build1) ... 387s Setting up cpp-15-s390x-linux-gnu (15.2.0-11ubuntu1) ... 387s Setting up python3-jupyter-client (8.7.0-1) ... 388s Setting up libarmadillo14 (1:14.2.3+dfsg-1) ... 388s Setting up libfontconfig1:s390x (2.15.0-2.4ubuntu1) ... 388s Setting up libyuv0:s390x (0.0.1922.20260106-1) ... 388s Setting up python3-stack-data (0.6.3-3) ... 388s Setting up gcc-15-s390x-linux-gnu (15.2.0-11ubuntu1) ... 388s Setting up g++-15-s390x-linux-gnu (15.2.0-11ubuntu1) ... 388s Setting up python3-pytest-recording (0.13.4-1) ... 389s Setting up libhdf5-hl-310:s390x (1.14.6+repack-2) ... 389s Setting up libavif16:s390x (1.3.0-1ubuntu3) ... 389s Setting up python3-shapely (2.1.2-1ubuntu1) ... 391s Setting up python3-uvicorn (0.38.0-1) ... 392s Setting up libpoppler147:s390x (25.03.0-11.1) ... 392s Setting up libproj25:s390x (9.7.1-1) ... 392s Setting up cpp-s390x-linux-gnu (4:15.2.0-4ubuntu1) ... 392s Setting up po-debconf (1.0.22) ... 392s Setting up libnetcdf22:s390x (1:4.9.3-1build1) ... 392s Setting up libkmlengine1t64:s390x (1.3.0-13) ... 392s Setting up libgeotiff5:s390x (1.7.4-1) ... 392s Setting up python3-nbclient (0.10.4-1) ... 393s Setting up gcc-s390x-linux-gnu (4:15.2.0-4ubuntu1) ... 393s Setting up python3-ipython (8.35.0-2) ... 395s /usr/lib/python3/dist-packages/IPython/core/interactiveshell.py:3141: SyntaxWarning: 'return' in a 'finally' block 395s return result 396s Setting up python3-nbconvert (7.16.6-1) ... 398s Setting up cpp-15 (15.2.0-11ubuntu1) ... 398s Setting up cpp (4:15.2.0-4ubuntu1) ... 398s Setting up libspatialite8t64:s390x (5.1.0-3ubuntu1) ... 398s Setting up g++-s390x-linux-gnu (4:15.2.0-4ubuntu1) ... 398s Setting up gcc-15 (15.2.0-11ubuntu1) ... 398s Setting up g++-15 (15.2.0-11ubuntu1) ... 398s Setting up libtool (2.5.4-9) ... 398s Setting up gcc (4:15.2.0-4ubuntu1) ... 398s Setting up dh-autoreconf (21) ... 398s Setting up g++ (4:15.2.0-4ubuntu1) ... 398s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 398s Setting up build-essential (12.12ubuntu2) ... 398s Setting up debhelper (13.28ubuntu1) ... 398s Setting up pybuild-plugin-autopkgtest (7.20251231) ... 398s Setting up libheif-plugin-aomdec:s390x (1.21.2-1) ... 398s Setting up libheif1:s390x (1.21.2-1) ... 398s Setting up libgdal36:s390x (3.10.3+dfsg-1build3) ... 398s Setting up libheif-plugin-libde265:s390x (1.21.2-1) ... 398s Setting up python3-rasterio (1.4.3-2build2) ... 400s Processing triggers for install-info (7.2-5) ... 400s Processing triggers for libc-bin (2.42-2ubuntu4) ... 400s Processing triggers for systemd (259-1ubuntu2) ... 400s Processing triggers for man-db (2.13.1-1) ... 407s Processing triggers for sgml-base (1.31+nmu1) ... 407s Setting up docutils-common (0.22.4+dfsg-1) ... 407s Processing triggers for sgml-base (1.31+nmu1) ... 407s Setting up python3-docutils (0.22.4+dfsg-1) ... 410s Setting up python3-sphinx (8.2.3-12) ... 416s Setting up python3-sphinx-autobuild (2025.08.25-1) ... 416s Setting up python3-sphinx-design (0.7.0-1) ... 418s Setting up python3-nbsphinx (0.9.5+ds-1) ... 419s Setting up python3-pydata-sphinx-theme (0.16.1+dfsg-5) ... 422s autopkgtest [14:58:13]: test pybuild-autopkgtest: pybuild-autopkgtest 422s autopkgtest [14:58:13]: test pybuild-autopkgtest: [----------------------- 423s pybuild-autopkgtest 425s I: pybuild base:384: cd /tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build; python3.13 -m pytest tests 438s ============================= test session starts ============================== 438s platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0 438s rootdir: /tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build 438s configfile: pyproject.toml 438s plugins: typeguard-4.4.4, mock-3.15.1, requests_mock-1.12.1, anyio-4.11.0, recording-0.13.4 438s collected 1557 items 438s 440s tests/extensions/test_classification.py .................... [ 1%] 440s tests/extensions/test_custom.py ....... [ 1%] 441s tests/extensions/test_datacube.py ................................. [ 3%] 443s tests/extensions/test_eo.py .......................................... [ 6%] 443s tests/extensions/test_ext.py ........................................... [ 9%] 444s ....... [ 9%] 445s tests/extensions/test_file.py ................................. [ 11%] 445s tests/extensions/test_grid.py ............ [ 12%] 445s tests/extensions/test_mgrs.py ................... [ 13%] 446s tests/extensions/test_mlm.py ........................................... [ 16%] 446s ... [ 16%] 447s tests/extensions/test_pointcloud.py ...................... [ 18%] 451s tests/extensions/test_projection.py ................................... [ 20%] 452s tests/extensions/test_raster.py ......... [ 21%] 452s tests/extensions/test_render.py .................. [ 22%] 452s tests/extensions/test_sar.py ...................... [ 23%] 452s tests/extensions/test_sat.py .......................... [ 25%] 454s tests/extensions/test_scientific.py .................................... [ 27%] 454s . [ 27%] 454s tests/extensions/test_storage.py ................... [ 28%] 454s tests/extensions/test_table.py ......... [ 29%] 455s tests/extensions/test_timestamps.py ................. [ 30%] 456s tests/extensions/test_version.py .............................. [ 32%] 457s tests/extensions/test_view.py ....................... [ 33%] 457s tests/extensions/test_xarray_assets.py ..................... [ 35%] 459s tests/html/test_html.py .......... [ 35%] 459s tests/posix_paths/test_posix_paths.py ...ss.ss [ 36%] 460s tests/serialization/test_identify.py ................................... [ 38%] 461s ........................................................................ [ 43%] 461s .......................... [ 45%] 462s tests/serialization/test_migrate.py .................................... [ 47%] 463s ........................................................................ [ 51%] 463s ......................... [ 53%] 464s tests/test_asset.py ...............ssss [ 54%] 464s tests/test_cache.py .... [ 55%] 467s tests/test_catalog.py .................................................. [ 58%] 491s ........................................................................ [ 62%] 492s ................... [ 64%] 492s tests/test_collection.py ............................................... [ 67%] 492s ...... [ 67%] 492s tests/test_common_metadata.py ...................... [ 68%] 493s tests/test_item.py ..................................................... [ 72%] 493s [ 72%] 494s tests/test_item_assets.py ............. [ 73%] 494s tests/test_item_collection.py .................. [ 74%] 495s tests/test_layout.py ............................................. [ 77%] 495s tests/test_link.py ........................................... [ 79%] 495s tests/test_pystac_client.py s. [ 80%] 495s tests/test_stac_io.py ................ [ 81%] 495s tests/test_summaries.py ........... [ 81%] 496s tests/test_utils.py ................................ssssssss..s......... [ 85%] 497s ............................................................... [ 89%] 497s tests/test_version.py .. [ 89%] 563s tests/test_writing.py ..................... [ 90%] 563s tests/validation/test_schema_uri_map.py . [ 90%] 587s tests/validation/test_validate.py ...................................... [ 93%] 598s ........................................................................ [ 97%] 632s .................................. [100%] 632s 632s ================= 1539 passed, 18 skipped in 202.59s (0:03:22) ================= 633s I: pybuild base:384: cd /tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build; python3.14 -m pytest tests 642s ============================= test session starts ============================== 642s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 642s rootdir: /tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build 642s configfile: pyproject.toml 642s plugins: typeguard-4.4.4, mock-3.15.1, requests_mock-1.12.1, anyio-4.11.0, recording-0.13.4 642s collected 1557 items 642s 645s tests/extensions/test_classification.py ......EE.....E...... [ 1%] 645s tests/extensions/test_custom.py ....... [ 1%] 647s tests/extensions/test_datacube.py .......................E..EE..... [ 3%] 651s tests/extensions/test_eo.py .....EE.EE...............EE............... [ 6%] 651s tests/extensions/test_ext.py ........................................... [ 9%] 651s ....... [ 9%] 658s tests/extensions/test_file.py .....EEE.....EEEEE.EEEEE.......EE [ 11%] 658s tests/extensions/test_grid.py ..E.E....... [ 12%] 660s tests/extensions/test_mgrs.py ........E...EEE.... [ 13%] 661s tests/extensions/test_mlm.py .........................E...E............. [ 16%] 661s ... [ 16%] 664s tests/extensions/test_pointcloud.py ..EEEEEEE............. [ 18%] 670s tests/extensions/test_projection.py ..EEE.EE.EEEEE.........E........... [ 20%] 671s tests/extensions/test_raster.py .EE...... [ 21%] 671s tests/extensions/test_render.py ................EE [ 22%] 672s tests/extensions/test_sar.py .EE................... [ 23%] 678s tests/extensions/test_sat.py ...EEEEEEEEE..EE.......... [ 25%] 686s tests/extensions/test_scientific.py ...EEEEEEEEEE...EEEEEEEEEE.......... [ 27%] 686s . [ 27%] 688s tests/extensions/test_storage.py ..E............EEEE [ 28%] 689s tests/extensions/test_table.py E........ [ 29%] 692s tests/extensions/test_timestamps.py ..EEEE........... [ 30%] 698s tests/extensions/test_version.py ...EEEEEEEE......EE.EE....EE.. [ 32%] 700s tests/extensions/test_view.py ..EEEEEE............... [ 33%] 701s tests/extensions/test_xarray_assets.py ...........EE....EE.. [ 35%] 703s tests/html/test_html.py .......... [ 35%] 703s tests/posix_paths/test_posix_paths.py ...ss.ss [ 36%] 704s tests/serialization/test_identify.py ................................... [ 38%] 704s ........................................................................ [ 43%] 704s .......................... [ 45%] 705s tests/serialization/test_migrate.py .................................... [ 47%] 705s ........................................................................ [ 51%] 706s ......................... [ 53%] 706s tests/test_asset.py ...............ssss [ 54%] 706s tests/test_cache.py .... [ 55%] 708s tests/test_catalog.py ........E......................................... [ 58%] 714s ...........................EEEEEEEE.................................EE.. [ 62%] 714s ................... [ 64%] 715s tests/test_collection.py ............................................... [ 67%] 715s ...... [ 67%] 715s tests/test_common_metadata.py ...................... [ 68%] 718s tests/test_item.py ..........E.E..E....E......................E......... [ 72%] 718s [ 72%] 718s tests/test_item_assets.py ............. [ 73%] 719s tests/test_item_collection.py .................. [ 74%] 719s tests/test_layout.py ............................................. [ 77%] 719s tests/test_link.py ........................................... [ 79%] 719s tests/test_pystac_client.py s. [ 80%] 722s tests/test_stac_io.py ...........EE.EE [ 81%] 722s tests/test_summaries.py ........... [ 81%] 723s tests/test_utils.py ................................ssssssss..s......... [ 85%] 724s ............................................................... [ 89%] 724s tests/test_version.py .. [ 89%] 735s tests/test_writing.py EEEEEEEEEEEEEEEEEEEEE [ 90%] 735s tests/validation/test_schema_uri_map.py . [ 90%] 756s tests/validation/test_validate.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 93%] 792s EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 97%] 811s EEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.... [100%] 811s 811s ==================================== ERRORS ==================================== 811s ____________________ ERROR at setup of test_apply_bitfields ____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_apply_classes _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________ ERROR at setup of test_validate_classification ________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________________ ERROR at setup of test_validate ________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_set_variables _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________________ ERROR at setup of test_set_dimensions _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________________ ERROR at setup of test_validate_eo ______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________________________ ERROR at setup of test_bands _________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________________ ERROR at setup of test_asset_bands ______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________________ ERROR at setup of test_cloud_cover ______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________ ERROR at setup of test_set_field[cloud_cover-7.8] _______________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________ ERROR at setup of test_set_field[snow_cover-99] ________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_validate_item _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __________________ ERROR at setup of test_validate_collection __________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ___________________ ERROR at setup of test_validate_catalog ____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________ ERROR at setup of test_set_field_on_asset[thumbnail-size-1] __________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ___ ERROR at setup of test_set_field_on_asset[measurement-header_size-8192] ____ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of test_set_field_on_asset[thumbnail-checksum-90e40210163700a8a6501eccd00b6d3b44ddaed0] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of test_set_field_on_asset[thumbnail-byte_order-little-endian] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of test_set_field_on_asset[calibrations-local_path-different-file.xml] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________ ERROR at setup of test_set_field_on_link[about-size-129302] __________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______ ERROR at setup of test_set_field_on_link[about-header_size-4092] _______ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of test_set_field_on_link[about-checksum-90e40210163700a8a6501eccd00b6d3b44ddaedb] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____ ERROR at setup of test_set_field_on_link[about-byte_order-big-endian] _____ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______ ERROR at setup of test_set_field_on_link[about-local_path-a/path] _______ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __________________ ERROR at setup of test_migrate_from_v2_0_0 __________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __________________ ERROR at setup of test_migrate_from_v1_0_0 __________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________________ ERROR at setup of test_attributes _______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_grid' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________________ ERROR at setup of test_modify _________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_grid' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________________ ERROR at setup of test_validate ________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________ ERROR at setup of test_set_field[latitude_band-C] _______________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________ ERROR at setup of test_set_field[grid_square-ZA] _______________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________ ERROR at setup of test_set_field[utm_zone-59] _________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________________________ ERROR at setup of test_apply _________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_mlm' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_validate_mlm ______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_mlm' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __________________ ERROR at setup of test_validate_pointcloud __________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________________________ ERROR at setup of test_count _________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________________________ ERROR at setup of test_type __________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________________ ERROR at setup of test_encoding ________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________________ ERROR at setup of test_schemas ________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________________ ERROR at setup of test_statistics _______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________________ ERROR at setup of test_density ________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_partial_apply _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_validate_proj _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________________________ ERROR at setup of test_epsg __________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________________________ ERROR at setup of test_wkt2 __________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________________ ERROR at setup of test_projjson ________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________________ ERROR at setup of test_geometry ________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________________________ ERROR at setup of test_bbox __________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________________ ERROR at setup of test_centroid ________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________________________ ERROR at setup of test_shape _________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________________ ERROR at setup of test_transform _______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_get_set_code ______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________________ ERROR at setup of test_validate_raster ____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_raster' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________________ ERROR at setup of test_asset_bands ______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_raster' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_item_validate _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_render' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __________________ ERROR at setup of test_collection_validate __________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_render' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________________ ERROR at setup of test_required ________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_sar' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __________________________ ERROR at setup of test_all __________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_sar' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_no_args_fails _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________________ ERROR at setup of test_orbit_state ______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________________ ERROR at setup of test_relative_orbit _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________________ ERROR at setup of test_absolute_orbit _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_anx_datetime ______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ___________ ERROR at setup of test_platform_international_designator ___________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________ ERROR at setup of test_relative_orbit_no_negative _______________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________________________ ERROR at setup of test_both __________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________________ ERROR at setup of test_modify _________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ___________________ ERROR at setup of test_clear_orbit_state ___________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________________ ERROR at setup of test_clear_relative_orbit __________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __________________________ ERROR at setup of test_doi __________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________________ ERROR at setup of test_citation ________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ___________________ ERROR at setup of test_publications_one ____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_publications ______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________ ERROR at setup of test_remove_publication_one _________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________ ERROR at setup of test_remove_all_publications_one ______________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________ ERROR at setup of test_remove_publication_forward _______________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________ ERROR at setup of test_remove_publication_reverse _______________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ___________ ERROR at setup of test_remove_all_publications_with_some ___________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ___________ ERROR at setup of test_remove_all_publications_with_none ___________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________________ ERROR at setup of test_collection_doi _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __________________ ERROR at setup of test_collection_citation __________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________ ERROR at setup of test_collection_publications_one ______________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________ ERROR at setup of test_collection_publications ________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ___________ ERROR at setup of test_collection_remove_publication_one ___________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________ ERROR at setup of test_collection_remove_all_publications_one _________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________ ERROR at setup of test_collection_remove_publication_forward _________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________ ERROR at setup of test_collection_remove_publication_reverse _________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____ ERROR at setup of test_collection_remove_all_publications_with_some ______ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____ ERROR at setup of test_collection_remove_all_publications_with_none ______ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ___________________ ERROR at setup of test_validate_storage ____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________________ ERROR at setup of test_asset_platform _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_asset_region ______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________________ ERROR at setup of test_asset_requester_pays __________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________________ ERROR at setup of test_asset_tier _______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________________ ERROR at setup of test_validate ________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_table' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __________________ ERROR at setup of test_validate_timestamps __________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________________ ERROR at setup of test_expires ________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________________ ERROR at setup of test_published _______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________________ ERROR at setup of test_unpublished ______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________________ ERROR at setup of test_add_version ______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________________ ERROR at setup of test_version_in_properties _________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________ ERROR at setup of test_add_not_deprecated_version _______________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________ ERROR at setup of test_add_deprecated_version _________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________________ ERROR at setup of test_latest _________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________________ ERROR at setup of test_predecessor ______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________________ ERROR at setup of test_successor _______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________________ ERROR at setup of test_all_links _______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________ ERROR at setup of test_collection_add_version _________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________ ERROR at setup of test_collection_validate_all ________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __________________ ERROR at setup of test_catalog_add_version __________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _________________ ERROR at setup of test_catalog_validate_all __________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ___________________ ERROR at setup of test_optional_version ____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________________ ERROR at setup of test_assets _________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_validate_view _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________________ ERROR at setup of test_off_nadir _______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________________ ERROR at setup of test_incidence_angle ____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________________ ERROR at setup of test_azimuth ________________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ______________________ ERROR at setup of test_sun_azimuth ______________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_sun_elevation _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_item_validate _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __________________ ERROR at setup of test_collection_validate __________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ___________ ERROR at setup of test_set_field[storage_options-value0] ___________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________ ERROR at setup of test_set_field[open_kwargs-value1] _____________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________ ERROR at setup of TestCatalog.test_read_remote ________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_catalog' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________ ERROR at setup of TestCatalog.test_validate_all[cat0] _____________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_catalog' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________ ERROR at setup of TestCatalog.test_validate_all[cat1] _____________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_catalog' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________ ERROR at setup of TestCatalog.test_validate_all[cat2] _____________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_catalog' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________ ERROR at setup of TestCatalog.test_validate_all[cat3] _____________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_catalog' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________ ERROR at setup of TestCatalog.test_validate_all[cat4] _____________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_catalog' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________ ERROR at setup of TestCatalog.test_validate_all[cat5] _____________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_catalog' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________ ERROR at setup of TestCatalog.test_validate_all[cat6] _____________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_catalog' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ___________ ERROR at setup of TestCatalog.test_validate_all_invalid ____________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_catalog' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________ ERROR at setup of test_validate_all_with_max_n ________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_catalog' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________ ERROR at setup of test_validate_all_with_recusive_off _____________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_catalog' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_null_datetime _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_item' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _______________ ERROR at setup of test_null_datetime_constructor _______________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_item' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_null_geometry _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_item' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ________________ ERROR at setup of test_relative_extension_path ________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_item' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________ ERROR at setup of test_non_hierarchical_relative_link _____________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_item' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________________ ERROR at setup of test_retry_stac_io _____________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ___________________ ERROR at setup of test_retry_stac_io_404 ___________________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s ____________ ERROR at setup of test_urls_with_non_ascii_characters _____________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _____________ ERROR at setup of test_proj_json_schema_is_readable ______________ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog0] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog1] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog2] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog3] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog4] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog5] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog6] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog0] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog1] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog2] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog3] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog4] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog5] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog6] _ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog0] ___ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog1] ___ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog2] ___ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog3] ___ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 811s 811s - construct literal match expressions from :class:`Literal` and 811s :class:`CaselessLiteral` classes 811s - construct character word-group expressions using the :class:`Word` 811s class 811s - see how to create repetitive expressions using :class:`ZeroOrMore` 811s and :class:`OneOrMore` classes 811s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 811s and :class:`'&'` operators to combine simple expressions into 811s more complex ones 811s - associate names with your parsed results using 811s :class:`ParserElement.set_results_name` 811s - access the parsed data, which is returned as a :class:`ParseResults` 811s object 811s - find some helpful expression short-cuts like :class:`DelimitedList` 811s and :class:`one_of` 811s - find more useful common expressions in the :class:`pyparsing_common` 811s namespace class 811s """ 811s from typing import NamedTuple 811s 811s 811s class version_info(NamedTuple): 811s major: int 811s minor: int 811s micro: int 811s releaselevel: str 811s serial: int 811s 811s @property 811s def __version__(self): 811s return ( 811s f"{self.major}.{self.minor}.{self.micro}" 811s + ( 811s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 811s "", 811s )[self.releaselevel == "final"] 811s ) 811s 811s def __str__(self): 811s return f"{__name__} {self.__version__} / {__version_time__}" 811s 811s def __repr__(self): 811s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 811s 811s 811s __version_info__ = version_info(3, 1, 3, "final", 1) 811s __version_time__ = "24 Aug 2024 23:47 UTC" 811s __version__ = __version_info__.__version__ 811s __versionTime__ = __version_time__ 811s __author__ = "Paul McGuire " 811s 811s from .util import * 811s from .exceptions import * 811s from .actions import * 811s > from .core import __diag__, __compat__ 811s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 811s E return f"{type(self).__name__}: {retString}" 811s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 811s E SyntaxError: 'return' in a 'finally' block 811s 811s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 811s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog4] ___ 811s 811s request = > 811s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 811s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 811s record_mode = 'none', disable_recording = False 811s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 811s 811s @pytest.fixture(autouse=True) # type: ignore 811s def vcr( 811s request: SubRequest, 811s vcr_markers: List[Mark], 811s vcr_cassette_dir: str, 811s record_mode: str, 811s disable_recording: bool, 811s pytestconfig: Config, 811s ) -> Iterator[Optional["Cassette"]]: 811s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 811s if disable_recording: 811s yield None 811s elif vcr_markers: 811s > from ._vcr import use_cassette 811s 811s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 811s from vcr import VCR 811s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 811s from .config import VCR 811s /usr/lib/python3/dist-packages/vcr/config.py:10: in 811s from .cassette import Cassette 811s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 811s from .patch import CassettePatcherBuilder 811s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 811s import httplib2 811s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 811s from . import auth 811s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 811s import pyparsing as pp 811s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 811s 811s # module pyparsing.py 811s # 811s # Copyright (c) 2003-2022 Paul T. McGuire 811s # 811s # Permission is hereby granted, free of charge, to any person obtaining 811s # a copy of this software and associated documentation files (the 811s # "Software"), to deal in the Software without restriction, including 811s # without limitation the rights to use, copy, modify, merge, publish, 811s # distribute, sublicense, and/or sell copies of the Software, and to 811s # permit persons to whom the Software is furnished to do so, subject to 811s # the following conditions: 811s # 811s # The above copyright notice and this permission notice shall be 811s # included in all copies or substantial portions of the Software. 811s # 811s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 811s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 811s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 811s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 811s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 811s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 811s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 811s # 811s 811s __doc__ = """ 811s pyparsing module - Classes and methods to define and execute parsing grammars 811s ============================================================================= 811s 811s The pyparsing module is an alternative approach to creating and 811s executing simple grammars, vs. the traditional lex/yacc approach, or the 811s use of regular expressions. With pyparsing, you don't need to learn 811s a new syntax for defining grammars or matching expressions - the parsing 811s module provides a library of classes that you use to construct the 811s grammar directly in Python. 811s 811s Here is a program to parse "Hello, World!" (or any greeting of the form 811s ``", !"``), built up using :class:`Word`, 811s :class:`Literal`, and :class:`And` elements 811s (the :meth:`'+'` operators create :class:`And` expressions, 811s and the strings are auto-converted to :class:`Literal` expressions):: 811s 811s from pyparsing import Word, alphas 811s 811s # define grammar of a greeting 811s greet = Word(alphas) + "," + Word(alphas) + "!" 811s 811s hello = "Hello, World!" 811s print(hello, "->", greet.parse_string(hello)) 811s 811s The program outputs the following:: 811s 811s Hello, World! -> ['Hello', ',', 'World', '!'] 811s 811s The Python representation of the grammar is quite readable, owing to the 811s self-explanatory class names, and the use of :class:`'+'`, 811s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 811s 811s The :class:`ParseResults` object returned from 811s :class:`ParserElement.parse_string` can be 811s accessed as a nested list, a dictionary, or an object with named 811s attributes. 811s 811s The pyparsing module handles some of the problems that are typically 811s vexing when writing text parsers: 811s 811s - extra or missing whitespace (the above program will also handle 811s "Hello,World!", "Hello , World !", etc.) 811s - quoted strings 811s - embedded comments 811s 811s 811s Getting Started - 811s ----------------- 811s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 811s see the base classes that most other pyparsing 811s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog5] ___ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog6] ___ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/cassettes/test_writing' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _________ ERROR at setup of TestValidate.test_validate_current_version _________ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example0] ________ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example1] ________ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example2] ________ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example3] ________ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example4] ________ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example5] ________ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example6] ________ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example7] ________ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example8] ________ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example9] ________ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example10] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example11] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example12] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example13] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example14] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example15] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example16] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example17] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example18] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example19] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example20] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example21] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example22] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example23] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example24] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example25] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example26] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example27] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example28] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example29] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example30] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example31] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example32] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example33] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example34] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example35] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example36] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example37] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example38] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example39] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example40] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example41] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example42] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example43] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example44] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example45] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example46] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example47] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example48] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example49] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example50] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example51] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example52] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example53] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example54] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example55] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example56] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example57] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example58] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example59] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example60] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example61] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example62] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example63] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example64] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example65] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example66] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example67] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example68] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example69] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example70] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example71] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example72] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example73] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example74] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example75] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example76] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example77] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example78] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example79] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example80] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example81] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example82] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example83] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example84] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example85] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example86] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example87] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example88] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example89] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example90] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example91] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example92] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example93] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example94] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example95] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example96] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example97] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example98] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_examples[example99] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example100] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example101] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example102] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example103] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example104] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example105] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example106] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example107] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example108] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example109] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example110] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example111] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example112] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example113] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example114] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example115] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example116] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example117] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example118] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example119] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example120] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example121] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example122] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example123] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_examples[example124] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_error_contains_href _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _____ ERROR at setup of TestValidate.test_validate_all_deprecated_dict_arg _____ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _ ERROR at setup of TestValidate.test_validate_all_deprecated_dict_arg_missing_href _ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______ ERROR at setup of TestValidate.test_validate_all_unexpected_href _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _______________ ERROR at setup of TestValidate.test_validate_all _______________ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case0] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case1] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case2] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case3] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case4] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case5] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case6] _______ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s _ ERROR at setup of TestValidate.test_validates_geojson_with_tuple_coordinates _ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s ________ ERROR at setup of TestValidate.test_validate_custom_validator _________ 812s 812s request = > 812s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 812s vcr_cassette_dir = '/tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 812s record_mode = 'none', disable_recording = False 812s pytestconfig = <_pytest.config.Config object at 0x3ffb46446e0> 812s 812s @pytest.fixture(autouse=True) # type: ignore 812s def vcr( 812s request: SubRequest, 812s vcr_markers: List[Mark], 812s vcr_cassette_dir: str, 812s record_mode: str, 812s disable_recording: bool, 812s pytestconfig: Config, 812s ) -> Iterator[Optional["Cassette"]]: 812s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 812s if disable_recording: 812s yield None 812s elif vcr_markers: 812s > from ._vcr import use_cassette 812s 812s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 812s from vcr import VCR 812s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 812s from .config import VCR 812s /usr/lib/python3/dist-packages/vcr/config.py:10: in 812s from .cassette import Cassette 812s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 812s from .patch import CassettePatcherBuilder 812s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 812s import httplib2 812s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 812s from . import auth 812s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 812s import pyparsing as pp 812s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 812s 812s # module pyparsing.py 812s # 812s # Copyright (c) 2003-2022 Paul T. McGuire 812s # 812s # Permission is hereby granted, free of charge, to any person obtaining 812s # a copy of this software and associated documentation files (the 812s # "Software"), to deal in the Software without restriction, including 812s # without limitation the rights to use, copy, modify, merge, publish, 812s # distribute, sublicense, and/or sell copies of the Software, and to 812s # permit persons to whom the Software is furnished to do so, subject to 812s # the following conditions: 812s # 812s # The above copyright notice and this permission notice shall be 812s # included in all copies or substantial portions of the Software. 812s # 812s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 812s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 812s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 812s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 812s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 812s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 812s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 812s # 812s 812s __doc__ = """ 812s pyparsing module - Classes and methods to define and execute parsing grammars 812s ============================================================================= 812s 812s The pyparsing module is an alternative approach to creating and 812s executing simple grammars, vs. the traditional lex/yacc approach, or the 812s use of regular expressions. With pyparsing, you don't need to learn 812s a new syntax for defining grammars or matching expressions - the parsing 812s module provides a library of classes that you use to construct the 812s grammar directly in Python. 812s 812s Here is a program to parse "Hello, World!" (or any greeting of the form 812s ``", !"``), built up using :class:`Word`, 812s :class:`Literal`, and :class:`And` elements 812s (the :meth:`'+'` operators create :class:`And` expressions, 812s and the strings are auto-converted to :class:`Literal` expressions):: 812s 812s from pyparsing import Word, alphas 812s 812s # define grammar of a greeting 812s greet = Word(alphas) + "," + Word(alphas) + "!" 812s 812s hello = "Hello, World!" 812s print(hello, "->", greet.parse_string(hello)) 812s 812s The program outputs the following:: 812s 812s Hello, World! -> ['Hello', ',', 'World', '!'] 812s 812s The Python representation of the grammar is quite readable, owing to the 812s self-explanatory class names, and the use of :class:`'+'`, 812s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 812s 812s The :class:`ParseResults` object returned from 812s :class:`ParserElement.parse_string` can be 812s accessed as a nested list, a dictionary, or an object with named 812s attributes. 812s 812s The pyparsing module handles some of the problems that are typically 812s vexing when writing text parsers: 812s 812s - extra or missing whitespace (the above program will also handle 812s "Hello,World!", "Hello , World !", etc.) 812s - quoted strings 812s - embedded comments 812s 812s 812s Getting Started - 812s ----------------- 812s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 812s see the base classes that most other pyparsing 812s classes inherit from. Use the docstrings for examples of how to: 812s 812s - construct literal match expressions from :class:`Literal` and 812s :class:`CaselessLiteral` classes 812s - construct character word-group expressions using the :class:`Word` 812s class 812s - see how to create repetitive expressions using :class:`ZeroOrMore` 812s and :class:`OneOrMore` classes 812s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 812s and :class:`'&'` operators to combine simple expressions into 812s more complex ones 812s - associate names with your parsed results using 812s :class:`ParserElement.set_results_name` 812s - access the parsed data, which is returned as a :class:`ParseResults` 812s object 812s - find some helpful expression short-cuts like :class:`DelimitedList` 812s and :class:`one_of` 812s - find more useful common expressions in the :class:`pyparsing_common` 812s namespace class 812s """ 812s from typing import NamedTuple 812s 812s 812s class version_info(NamedTuple): 812s major: int 812s minor: int 812s micro: int 812s releaselevel: str 812s serial: int 812s 812s @property 812s def __version__(self): 812s return ( 812s f"{self.major}.{self.minor}.{self.micro}" 812s + ( 812s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 812s "", 812s )[self.releaselevel == "final"] 812s ) 812s 812s def __str__(self): 812s return f"{__name__} {self.__version__} / {__version_time__}" 812s 812s def __repr__(self): 812s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 812s 812s 812s __version_info__ = version_info(3, 1, 3, "final", 1) 812s __version_time__ = "24 Aug 2024 23:47 UTC" 812s __version__ = __version_info__.__version__ 812s __versionTime__ = __version_time__ 812s __author__ = "Paul McGuire " 812s 812s from .util import * 812s from .exceptions import * 812s from .actions import * 812s > from .core import __diag__, __compat__ 812s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 812s E return f"{type(self).__name__}: {retString}" 812s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 812s E SyntaxError: 'return' in a 'finally' block 812s 812s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 812s =========================== short test summary info ============================ 812s ERROR tests/extensions/test_classification.py::test_apply_bitfields - File ... 812s ERROR tests/extensions/test_classification.py::test_apply_classes - File "/... 812s ERROR tests/extensions/test_classification.py::test_validate_classification 812s ERROR tests/extensions/test_datacube.py::test_validate - File "/usr/lib/pyt... 812s ERROR tests/extensions/test_datacube.py::test_set_variables - File "/usr/li... 812s ERROR tests/extensions/test_datacube.py::test_set_dimensions - File "/usr/l... 812s ERROR tests/extensions/test_eo.py::test_validate_eo - File "/usr/lib/python... 812s ERROR tests/extensions/test_eo.py::test_bands - File "/usr/lib/python3/dist... 812s ERROR tests/extensions/test_eo.py::test_asset_bands - File "/usr/lib/python... 812s ERROR tests/extensions/test_eo.py::test_cloud_cover - File "/usr/lib/python... 812s ERROR tests/extensions/test_eo.py::test_set_field[cloud_cover-7.8] - File "... 812s ERROR tests/extensions/test_eo.py::test_set_field[snow_cover-99] - File "/u... 812s ERROR tests/extensions/test_file.py::test_validate_item - File "/usr/lib/py... 812s ERROR tests/extensions/test_file.py::test_validate_collection - File "/usr/... 812s ERROR tests/extensions/test_file.py::test_validate_catalog - File "/usr/lib... 812s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-size-1] 812s ERROR tests/extensions/test_file.py::test_set_field_on_asset[measurement-header_size-8192] 812s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-checksum-90e40210163700a8a6501eccd00b6d3b44ddaed0] 812s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-byte_order-little-endian] 812s ERROR tests/extensions/test_file.py::test_set_field_on_asset[calibrations-local_path-different-file.xml] 812s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-size-129302] 812s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-header_size-4092] 812s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-checksum-90e40210163700a8a6501eccd00b6d3b44ddaedb] 812s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-byte_order-big-endian] 812s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-local_path-a/path] 812s ERROR tests/extensions/test_file.py::test_migrate_from_v2_0_0 - File "/usr/... 812s ERROR tests/extensions/test_file.py::test_migrate_from_v1_0_0 - File "/usr/... 812s ERROR tests/extensions/test_grid.py::test_attributes - File "/usr/lib/pytho... 812s ERROR tests/extensions/test_grid.py::test_modify - File "/usr/lib/python3/d... 812s ERROR tests/extensions/test_mgrs.py::test_validate - File "/usr/lib/python3... 812s ERROR tests/extensions/test_mgrs.py::test_set_field[latitude_band-C] - File... 812s ERROR tests/extensions/test_mgrs.py::test_set_field[grid_square-ZA] - File ... 812s ERROR tests/extensions/test_mgrs.py::test_set_field[utm_zone-59] - File "/u... 812s ERROR tests/extensions/test_mlm.py::test_apply - File "/usr/lib/python3/dis... 812s ERROR tests/extensions/test_mlm.py::test_validate_mlm - File "/usr/lib/pyth... 812s ERROR tests/extensions/test_pointcloud.py::test_validate_pointcloud - File ... 812s ERROR tests/extensions/test_pointcloud.py::test_count - File "/usr/lib/pyth... 812s ERROR tests/extensions/test_pointcloud.py::test_type - File "/usr/lib/pytho... 812s ERROR tests/extensions/test_pointcloud.py::test_encoding - File "/usr/lib/p... 812s ERROR tests/extensions/test_pointcloud.py::test_schemas - File "/usr/lib/py... 812s ERROR tests/extensions/test_pointcloud.py::test_statistics - File "/usr/lib... 812s ERROR tests/extensions/test_pointcloud.py::test_density - File "/usr/lib/py... 812s ERROR tests/extensions/test_projection.py::test_partial_apply - File "/usr/... 812s ERROR tests/extensions/test_projection.py::test_validate_proj - File "/usr/... 812s ERROR tests/extensions/test_projection.py::test_epsg - File "/usr/lib/pytho... 812s ERROR tests/extensions/test_projection.py::test_wkt2 - File "/usr/lib/pytho... 812s ERROR tests/extensions/test_projection.py::test_projjson - File "/usr/lib/p... 812s ERROR tests/extensions/test_projection.py::test_geometry - File "/usr/lib/p... 812s ERROR tests/extensions/test_projection.py::test_bbox - File "/usr/lib/pytho... 812s ERROR tests/extensions/test_projection.py::test_centroid - File "/usr/lib/p... 812s ERROR tests/extensions/test_projection.py::test_shape - File "/usr/lib/pyth... 812s ERROR tests/extensions/test_projection.py::test_transform - File "/usr/lib/... 812s ERROR tests/extensions/test_projection.py::test_get_set_code - File "/usr/l... 812s ERROR tests/extensions/test_raster.py::test_validate_raster - File "/usr/li... 812s ERROR tests/extensions/test_raster.py::test_asset_bands - File "/usr/lib/py... 812s ERROR tests/extensions/test_render.py::test_item_validate - File "/usr/lib/... 812s ERROR tests/extensions/test_render.py::test_collection_validate - File "/us... 812s ERROR tests/extensions/test_sar.py::test_required - File "/usr/lib/python3/... 812s ERROR tests/extensions/test_sar.py::test_all - File "/usr/lib/python3/dist-... 812s ERROR tests/extensions/test_sat.py::test_no_args_fails - File "/usr/lib/pyt... 812s ERROR tests/extensions/test_sat.py::test_orbit_state - File "/usr/lib/pytho... 812s ERROR tests/extensions/test_sat.py::test_relative_orbit - File "/usr/lib/py... 812s ERROR tests/extensions/test_sat.py::test_absolute_orbit - File "/usr/lib/py... 812s ERROR tests/extensions/test_sat.py::test_anx_datetime - File "/usr/lib/pyth... 812s ERROR tests/extensions/test_sat.py::test_platform_international_designator - ... 812s ERROR tests/extensions/test_sat.py::test_relative_orbit_no_negative - File ... 812s ERROR tests/extensions/test_sat.py::test_both - File "/usr/lib/python3/dist... 812s ERROR tests/extensions/test_sat.py::test_modify - File "/usr/lib/python3/di... 812s ERROR tests/extensions/test_sat.py::test_clear_orbit_state - File "/usr/lib... 812s ERROR tests/extensions/test_sat.py::test_clear_relative_orbit - File "/usr/... 812s ERROR tests/extensions/test_scientific.py::test_doi - File "/usr/lib/python... 812s ERROR tests/extensions/test_scientific.py::test_citation - File "/usr/lib/p... 812s ERROR tests/extensions/test_scientific.py::test_publications_one - File "/u... 812s ERROR tests/extensions/test_scientific.py::test_publications - File "/usr/l... 812s ERROR tests/extensions/test_scientific.py::test_remove_publication_one - Fi... 812s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_one 812s ERROR tests/extensions/test_scientific.py::test_remove_publication_forward - ... 812s ERROR tests/extensions/test_scientific.py::test_remove_publication_reverse - ... 812s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_with_some 812s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_with_none 812s ERROR tests/extensions/test_scientific.py::test_collection_doi - File "/usr... 812s ERROR tests/extensions/test_scientific.py::test_collection_citation - File ... 812s ERROR tests/extensions/test_scientific.py::test_collection_publications_one 812s ERROR tests/extensions/test_scientific.py::test_collection_publications - F... 812s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_one 812s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_one 812s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_forward 812s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_reverse 812s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_with_some 812s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_with_none 812s ERROR tests/extensions/test_storage.py::test_validate_storage - File "/usr/... 812s ERROR tests/extensions/test_storage.py::test_asset_platform - File "/usr/li... 812s ERROR tests/extensions/test_storage.py::test_asset_region - File "/usr/lib/... 812s ERROR tests/extensions/test_storage.py::test_asset_requester_pays - File "/... 812s ERROR tests/extensions/test_storage.py::test_asset_tier - File "/usr/lib/py... 812s ERROR tests/extensions/test_table.py::test_validate - File "/usr/lib/python... 812s ERROR tests/extensions/test_timestamps.py::test_validate_timestamps - File ... 812s ERROR tests/extensions/test_timestamps.py::test_expires - File "/usr/lib/py... 812s ERROR tests/extensions/test_timestamps.py::test_published - File "/usr/lib/... 812s ERROR tests/extensions/test_timestamps.py::test_unpublished - File "/usr/li... 812s ERROR tests/extensions/test_version.py::test_add_version - File "/usr/lib/p... 812s ERROR tests/extensions/test_version.py::test_version_in_properties - File "... 812s ERROR tests/extensions/test_version.py::test_add_not_deprecated_version - F... 812s ERROR tests/extensions/test_version.py::test_add_deprecated_version - File ... 812s ERROR tests/extensions/test_version.py::test_latest - File "/usr/lib/python... 812s ERROR tests/extensions/test_version.py::test_predecessor - File "/usr/lib/p... 812s ERROR tests/extensions/test_version.py::test_successor - File "/usr/lib/pyt... 812s ERROR tests/extensions/test_version.py::test_all_links - File "/usr/lib/pyt... 812s ERROR tests/extensions/test_version.py::test_collection_add_version - File ... 812s ERROR tests/extensions/test_version.py::test_collection_validate_all - File... 812s ERROR tests/extensions/test_version.py::test_catalog_add_version - File "/u... 812s ERROR tests/extensions/test_version.py::test_catalog_validate_all - File "/... 812s ERROR tests/extensions/test_version.py::test_optional_version - File "/usr/... 812s ERROR tests/extensions/test_version.py::test_assets - File "/usr/lib/python... 812s ERROR tests/extensions/test_view.py::test_validate_view - File "/usr/lib/py... 812s ERROR tests/extensions/test_view.py::test_off_nadir - File "/usr/lib/python... 812s ERROR tests/extensions/test_view.py::test_incidence_angle - File "/usr/lib/... 812s ERROR tests/extensions/test_view.py::test_azimuth - File "/usr/lib/python3/... 812s ERROR tests/extensions/test_view.py::test_sun_azimuth - File "/usr/lib/pyth... 812s ERROR tests/extensions/test_view.py::test_sun_elevation - File "/usr/lib/py... 812s ERROR tests/extensions/test_xarray_assets.py::test_item_validate - File "/u... 812s ERROR tests/extensions/test_xarray_assets.py::test_collection_validate - Fi... 812s ERROR tests/extensions/test_xarray_assets.py::test_set_field[storage_options-value0] 812s ERROR tests/extensions/test_xarray_assets.py::test_set_field[open_kwargs-value1] 812s ERROR tests/test_catalog.py::TestCatalog::test_read_remote - File "/usr/lib... 812s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat0] - File "/... 812s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat1] - File "/... 812s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat2] - File "/... 812s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat3] - File "/... 812s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat4] - File "/... 812s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat5] - File "/... 812s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat6] - File "/... 812s ERROR tests/test_catalog.py::TestCatalog::test_validate_all_invalid - File ... 812s ERROR tests/test_catalog.py::test_validate_all_with_max_n - File "/usr/lib/... 812s ERROR tests/test_catalog.py::test_validate_all_with_recusive_off - File "/u... 812s ERROR tests/test_item.py::test_null_datetime - File "/usr/lib/python3/dist-... 812s ERROR tests/test_item.py::test_null_datetime_constructor - File "/usr/lib/p... 812s ERROR tests/test_item.py::test_null_geometry - File "/usr/lib/python3/dist-... 812s ERROR tests/test_item.py::test_relative_extension_path - File "/usr/lib/pyt... 812s ERROR tests/test_item.py::test_non_hierarchical_relative_link - File "/usr/... 812s ERROR tests/test_stac_io.py::test_retry_stac_io - File "/usr/lib/python3/di... 812s ERROR tests/test_stac_io.py::test_retry_stac_io_404 - File "/usr/lib/python... 812s ERROR tests/test_stac_io.py::test_urls_with_non_ascii_characters - File "/u... 812s ERROR tests/test_stac_io.py::test_proj_json_schema_is_readable - File "/usr... 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog0] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog1] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog2] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog3] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog4] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog5] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog6] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog0] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog1] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog2] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog3] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog4] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog5] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog6] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog0] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog1] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog2] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog3] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog4] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog5] 812s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog6] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_current_version 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example0] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example1] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example2] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example3] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example4] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example5] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example6] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example7] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example8] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example9] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example10] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example11] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example12] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example13] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example14] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example15] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example16] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example17] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example18] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example19] 812s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example20] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example21] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example22] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example23] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example24] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example25] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example26] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example27] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example28] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example29] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example30] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example31] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example32] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example33] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example34] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example35] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example36] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example37] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example38] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example39] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example40] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example41] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example42] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example43] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example44] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example45] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example46] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example47] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example48] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example49] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example50] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example51] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example52] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example53] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example54] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example55] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example56] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example57] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example58] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example59] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example60] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example61] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example62] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example63] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example64] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example65] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example66] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example67] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example68] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example69] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example70] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example71] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example72] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example73] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example74] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example75] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example76] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example77] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example78] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example79] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example80] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example81] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example82] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example83] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example84] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example85] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example86] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example87] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example88] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example89] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example90] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example91] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example92] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example93] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example94] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example95] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example96] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example97] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example98] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example99] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example100] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example101] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example102] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example103] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example104] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example105] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example106] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example107] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example108] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example109] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example110] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example111] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example112] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example113] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example114] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example115] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example116] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example117] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example118] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example119] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example120] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example121] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example122] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example123] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example124] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_error_contains_href 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_deprecated_dict_arg 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_deprecated_dict_arg_missing_href 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_unexpected_href 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all - ... 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case0] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case1] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case2] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case3] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case4] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case5] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case6] 813s ERROR tests/validation/test_validate.py::TestValidate::test_validates_geojson_with_tuple_coordinates 813s ERROR tests/validation/test_validate.py::TestValidate::test_validate_custom_validator 813s =========== 1234 passed, 18 skipped, 305 errors in 176.97s (0:02:56) =========== 814s E: pybuild pybuild:483: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest.wCxcNf/autopkgtest_tmp/build; python3.14 -m pytest tests 814s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p "3.13 3.14" returned exit code 13 814s make: *** [/tmp/m7tHlc94iz/run:4: pybuild-autopkgtest] Error 25 814s pybuild-autopkgtest: error: /tmp/m7tHlc94iz/run pybuild-autopkgtest returned exit code 2 814s autopkgtest [15:04:45]: test pybuild-autopkgtest: -----------------------] 815s pybuild-autopkgtest FAIL non-zero exit status 25 815s autopkgtest [15:04:46]: test pybuild-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 815s autopkgtest [15:04:46]: @@@@@@@@@@@@@@@@@@@@ summary 815s pybuild-autopkgtest FAIL non-zero exit status 25